This is the mail archive of the 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]

mark_closed messages

As I mentioned before, when using cygserver I've been seeming
rather too many error messages from "mark_closed" (in
Altho' triggered by cygserver, the problem turned out to an
existing problem with the protected handle debugging code, which
has some but not all the code needed to deal with inherited

I was looking to fix this properly but I've decided, after some
investigation that taught me lots about how fork() works in
cygwin, that I've not the time or energy for this right now.

AFAICT (and this was all new to me, so I may be utterly adrift
here), the difficulty is that the child process needs to create
and protect handles *before* the parent's data space is copied
down into it.  So, the child would need to keep a temporary list
of protected handles and merge these into the list it inherited
from the parent once it had access to it.  Not impossible but not
my cup of tea today.

The current implementation simply doesn't copy down the protected
handle list at all (all the data structures are marked NO_COPY).
Unfortunately there is still code in the fhandler class that tries
to update inherited handle values with new child handles; see
fhandler_base::fork_fixup () and setclexec_pid ().  This ended up
overwriting child handle values with other child handle values.
Lots of fun on close.  So, I've just #if 0'd setclexec_pid () for
now.  Volunteers welcome etc.

I've attached a patch that fixes a couple of other minor issues in (mostly muto handling) and disables the "setclexec_pid()"

// Conrad

Attachment: ChangeLog.txt
Description: Text document

Attachment: debug.patch
Description: Binary data

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