At Wed, 5 Feb 2003 14:05:36 +0100 (CET),
Jaroslav wrote:
> 
> On Wed, 5 Feb 2003, Takashi Iwai wrote:
> 
> > At Wed, 5 Feb 2003 12:20:23 +0100 (CET),
> > Jaroslav wrote:
> > > 
> > > Well, I and Abramo think that it's better to force application developers 
> > > to clean allocated things before they'll call exec().
> > 
> > the problem is not only the explicit exec() call.
> > without this bit, you'll pass the fds to other processes even by
> > popen() or system() or whatever.  that is, if your application calls
> > an external program in the middle, it can block the operation.
> > 
> > i don't see any critical drawback of setting FD_CLOEXEC as default.
> > the application which needs to pass the alsa-lib's fds _explicitly_
> > can reset the bit via fcntl() again before calling exec().
> 
> Do we have any precedence? sockets? fopen? etc.?

it has nothing to do with what type of file descriptor is used, or
for what purpose.

i meant simply which behavior is _safer_.
sure, we can leave it as it was, and let users debug all.
IMO, however, the FD_CLOEXEC would lead to less bugs, if you think
which possibility is higher, whether to pass the fd intentionally,
or not,


Takashi


-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
_______________________________________________
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel

Reply via email to