From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takashi Iwai Subject: Re: [BUG] alsa-lib leaves sound device open for child processes Date: Wed, 05 Feb 2003 14:55:00 +0100 Sender: alsa-devel-admin@lists.sourceforge.net Message-ID: References: Mime-Version: 1.0 (generated by SEMI 1.14.4 - "Hosorogi") Content-Type: text/plain; charset=US-ASCII Return-path: In-Reply-To: Errors-To: alsa-devel-admin@lists.sourceforge.net List-Help: List-Post: List-Subscribe: , List-Unsubscribe: , List-Archive: To: Jaroslav Kysela Cc: Sebastian Kapfer , "alsa-devel@lists.sourceforge.net" List-Id: alsa-devel@alsa-project.org 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