lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20070906133858.19080@gmx.net>
Date:	Thu, 06 Sep 2007 15:38:58 +0200
From:	"Michael Kerrisk" <mtk-manpages@....net>
To:	"Ulrich Drepper" <drepper@...il.com>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: O_CLOEXEC / MSG_CMSG_CLOEXEC documentation

Ulrich,

> On 9/5/07, Michael Kerrisk <mtk-manpages@....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'.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ