From: "Michael Kerrisk" <mtk-manpages@gmx.net>
To: "Ulrich Drepper" <drepper@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: O_CLOEXEC / MSG_CMSG_CLOEXEC documentation
Date: Thu, 06 Sep 2007 15:38:58 +0200 [thread overview]
Message-ID: <20070906133858.19080@gmx.net> (raw)
In-Reply-To: <a36005b50709060434u35d8db01n7cc448e98fdbdd37@mail.gmail.com>
Ulrich,
> On 9/5/07, Michael Kerrisk <mtk-manpages@gmx.net> wrote:
> > O_CLOEXEC (Since Linux 2.6.23)
> > Enable the close-on-exec flag for the new file
> > descriptor. This is useful in multithreaded programs
> > since using a separate fcntl(2) F_SETFD operation to
> > set the FD_CLOEXEC flag does not suffice to avoid race
> > conditions in multithreaded programs where one thread
> > opens a file descriptor at the same time as another
> > thread does a fork(2) plus execve(2).
>
> Correct,
Good. Thanks.
> although you might want to reconsider the repetition of "in
> multithreaded programs".
Yes.
> Plus, it's also useful in other programs since it avoids the
> additional system call to fcntl.
Okay, I may add some words about this.
Cheers,
Michael
--
Michael Kerrisk
maintainer of Linux man pages Sections 2, 3, 4, 5, and 7
Want to help with man page maintenance?
Grab the latest tarball at
http://www.kernel.org/pub/linux/docs/manpages ,
read the HOWTOHELP file and grep the source
files for 'FIXME'.
prev parent reply other threads:[~2007-09-06 13:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200705312320.l4VNKS44030545@shell0.pdx.osdl.net>
2007-09-05 19:02 ` O_CLOEXEC / MSG_CMSG_CLOEXEC documentation Michael Kerrisk
2007-09-06 11:34 ` Ulrich Drepper
2007-09-06 13:38 ` Michael Kerrisk [this message]
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=20070906133858.19080@gmx.net \
--to=mtk-manpages@gmx.net \
--cc=drepper@gmail.com \
--cc=linux-kernel@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox