This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
Re: fcntl(F_SETFD) on a file or socket handle
"Corinna Vinschen" <cygwin@cygwin.com> wrote:
[skipped]
> > I didn't investigate it further, and probably will not have time in the near
> > future to do so. Sorry.
>
> :-(
>
> You could at least send a testcase if you don't want to debug it.
Analyzing Cygwin code, it seems I have found the source of the problem (had no
time to confirm it running offending code though).
It's in the fhandler_base::set_inheritance() called from fhandler_base::set_close_on_exec().
DuplicateHandle()/CloseHandle() invalidates original system handle associated
with the Cygwin internal file descriptor (fd) while an operation on the fd is
possibly still in progress.
--
Dmitry.
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/