Corinna Vinschen corinna-cygwin@cygwin.com
Thu Jan 14 11:57:00 GMT 2010

On Jan 14 12:47, Corinna Vinschen wrote:
> On Jan 13 21:00, Eric Blake wrote:
> >   And while it looks
> > like mq_open should not care about O_CLOEXEC, there may be some cleanup
> > needed there.
> It just occured to me that this an important hint.  Message queue
> descriptors are always closed-on-exec.  Apparently I forgot to set the
> close-on-exec flag on the underlying file descriptor.  That's a good
> time to do that via the O_CLOEXEC flag.

Hang on, the file is closed anyway after the mmap call succeeded.
That's not true for sem_open and shm_open, though.

However, what kind of cleanup did you mean?  There's no EINVAL specified
in POSIX for invalid open flags and invalid flags are already filtered
out before calling open.


Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

More information about the Cygwin-patches mailing list