This is the mail archive of the
cygwin-developers
mailing list for the Cygwin project.
Re: bug in fdopendir
- From: Corinna Vinschen <corinna-cygwin at cygwin dot com>
- To: cygwin-developers at cygwin dot com
- Date: Mon, 9 Jul 2007 12:53:48 +0200
- Subject: Re: bug in fdopendir
- References: <468EA8AF.4060907@byu.net>
- Reply-to: cygwin-developers at cygwin dot com
On Jul 6 14:40, Eric Blake wrote:
> Also, POSIX is clear that DIR streams are not inherited across processes.
> I'm not quite sure why you are using OBJ_INHERIT in fhandler_disk_file.cc
> in the case of opendir, but that code did not change from before your
> patch. I also wonder if you need to tweak the fdopendir code to insure
> that if the directory fd was previously inheritable, that the fdopendir
> changes it to FD_CLOEXEC.
Not according to the draft, which states that it's unspecified whether
the FD_CLOEXEC flag will be set on the file descriptor by a successful
call to fdopendir. But it doesn't hurt to do so.
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Project Co-Leader cygwin AT cygwin DOT com
Red Hat