Signals and the such-like

Conrad Scott
Fri Jul 26 13:24:00 GMT 2002

"Christopher Faylor" <> wrote:
> I was about to reluctantly say ok and make the "exit_state"
> in do_exit a global but then I started to wonder if this isn't
> a problem with every call to close_all_files.  There are a
couple of
> them outside of the call to do_exit.  One is in spawn_guts and
> is on vfork.  I don't think either of those should hang either,
> should they?

Seems I was being a bit parochial: the code I've got can only
block on the last close (system wide) of a UNIX domain socket, so
the only close_all_files that I was seeing a problem with was the
one in do_exit.  But if blocking on close is a problem, then it
ought to be fixed everywhere.

I don't know enough about the two bits of code you mention (I'll
go have a look now) but a global flag is less appealing outside of
exit code (as it could be seen by code that isn't meant to be
affected --- in other threads?).  If this is a problem, a solution
might be a block/don't block flag to fhandler::close.  Pretty
mechanical to add but tedious.  Would you accept a patch that did

I'm just putting together a patch for my UNIX domain socket
changes and if there's no resolution to this issue, I'll just
leave (for the moment) the possibility of a block on close ---
it'll probably never happen in practice (famous last words?) and
the user can always kill the relevant server anyhow, which must
itself be having problems to block up the clients in this way.

Cheers for the moment,

// Conrad

More information about the Cygwin-developers mailing list