Thu Jan 14 16:10:00 GMT 2010
On Jan 14 08:39, Pierre A. Humblet wrote:
> At 08:17 AM 1/14/2010, Corinna Vinschen wrote:
> >On Jan 14 06:02, Eric Blake wrote:
> >> In a multi-threaded app, any fd that is opened only temporarily, such as
> >> the one in mq_open, should be opened with O_CLOEXEC, so that no other
> >> thread can win a race and do a fork/exec inside the window when the
> >> temporary fd was open. So even though mq_open does not leak an fd to the
> >> current process, it should pass O_CLOEXEC as part of its internal open()
> >> call in order to avoid leaking the fd to unrelated child processes.
> >Uh, ok, that makes sense.
> >I'll send a revised patch later today. It will also include the pipe2
> For the same reason we should also have SOCK_CLOEXEC, and
> SOCK_NONBLOCK while we are at it. I would use them in minires.
Sure, but probably not yet, as far as my hack time is concerned. But
of course SHTDI, PTC, and all that. I'd be glad for it, actually.
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Project Co-Leader cygwin AT cygwin DOT com
More information about the Cygwin-patches