This is the mail archive of the cygwin-patches@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Protect handle issue-ettes


"Christopher Faylor" <cgf@redhat.com> wrote:
>
> Huh?  The code in dll_crt0_1 is supposed to be called
> on a fork or an exec.  That's why I renamed it to
> debug_fixup_after_fork_exec.
> As far as I can tell it *is* called on a fork.
> strace confirms that.

Sorry Chris, I've obviously misunderstood something then.  I tried
calling setclexec() for one of the handles that was causing
trouble (the title_mutex) but it didn't change anything, while
removing the ProtectHandle call for it removed a whole lot of
warnings (as far as I can remember from this morning).

One thing that is confusing me is that if you call fcntl() to set
the close-on-exec flag for a file descriptor, this ends up calling
setclexec().  But if the clexec flag is honoured on fork (as well
as exec) how can this be right?

I'll go have another look at the code sometime soon and write some
test programs, since the volume of warnings in the cygserver
branch is a little distracting.

Thanks for the response,

// Conrad




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]