All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Jaroslav Kysela <perex@suse.cz>
Cc: Sebastian Kapfer <sebastian_kapfer@web.de>,
	"alsa-devel@lists.sourceforge.net"
	<alsa-devel@lists.sourceforge.net>
Subject: Re: [BUG] alsa-lib leaves sound device open for child processes
Date: Wed, 05 Feb 2003 14:55:00 +0100	[thread overview]
Message-ID: <s5hu1fig7d7.wl@alsa2.suse.de> (raw)
In-Reply-To: <Pine.LNX.4.44.0302051405150.1303-100000@pnote.perex-int.cz>

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

  reply	other threads:[~2003-02-05 13:55 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-02-03 22:16 [BUG] alsa-lib leaves sound device open for child processes Sebastian Kapfer
2003-02-05 11:20 ` Jaroslav Kysela
2003-02-05 12:42   ` Takashi Iwai
2003-02-05 13:05     ` Jaroslav Kysela
2003-02-05 13:55       ` Takashi Iwai [this message]
2003-02-05 14:03         ` Chris Rankin
2003-02-05 14:16           ` Paul Davis
  -- strict thread matches above, loose matches on Subject: below --
2003-02-05 18:50 Chris Rankin
     [not found] <20030205205905.7800db0c.sebastian_kapfer@web.de>
2003-02-05 22:39 ` Chris Rankin
2003-02-06 14:40   ` Sebastian Kapfer
2003-02-06 23:10     ` Chris Rankin
2003-02-07 13:03       ` Paul Davis
2003-02-07 13:58         ` Chris Rankin
2003-02-07 15:22           ` Paul Davis
2003-02-07 16:13           ` Takashi Iwai
2003-02-07 19:54             ` Chris Rankin
2003-02-07 14:37       ` Sebastian Kapfer
2003-02-07 19:46         ` Chris Rankin
2003-02-08 11:50           ` Jaroslav Kysela
2003-02-08 13:55             ` Sebastian Kapfer
2003-02-08 19:45             ` Sebastian Kapfer
2003-02-08 19:53               ` Jaroslav Kysela
2003-02-12 11:54                 ` Takashi Iwai
2003-02-12 12:46                   ` Jaroslav Kysela
2003-02-07 19:35 Chris Rankin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=s5hu1fig7d7.wl@alsa2.suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@lists.sourceforge.net \
    --cc=perex@suse.cz \
    --cc=sebastian_kapfer@web.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.