PATCH: Get rid of superfluous dup() and close() calls.

Michael Stefaniuc mstefani at redhat.de
Thu Feb 6 04:10:17 CST 2003


On Thu, Feb 06, 2003 at 10:49:17AM +0100, Martin Wilck wrote:
> On Mon, 2003-02-03, I wrote:
> 
> > Why is that relevant to Wine? 99% of the Wine code uses DOS/Windows
> > functions like WriteFile() anyway. All we need to do is make sure that
> > these functions handle the Unix fd's properly (and they will if they
> > don't call close()).
> 
> What's up, people? I think at least I deserve an answer to this
> argument. Or is everybody just too busy?
Well, i agree with you that the close call's shouldn't be needed but my
voice dosn't count.

bye
	michael

> I am not going to give up easily on this one, because I still think it's
> the right thing to do. If anybody is worried about regressions or the
> risk of future close() calls, I am willing to care for that.
> 
> As for the risk of someone inadvertently close()ing an fd and someone
> else writing to it, how about something like this:
> 
> static inline int wine_close_unix_fd (int fd) { return close (fd); }
> #define close(fd) ERROR --- please dont call close() in Wine !!
> 
> in the Wine headers, and changing close() to wine_close_unix_fd()
> wherever the close() is found to be legitimate?

-- 
Michael Stefaniuc               Tel.: +49-711-96437-199
System Administration           Fax.: +49-711-96437-111
Red Hat GmbH                    Email: mstefani at redhat.com
Hauptstaetterstr. 58            http://www.redhat.de/
D-70178 Stuttgart
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 232 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-devel/attachments/20030206/e938f2b0/attachment.pgp


More information about the wine-devel mailing list