Mon Jul 29 14:44:00 GMT 2002
"Christopher Faylor" <firstname.lastname@example.org> wrote:
> If you're just talking about system-wide closes then you could
> the technique currently employed in pipe.cc where events are
> as flags indicating when the "other side" of a pipe is closed.
That's a nice trick: each time the write-end of the pipe is
duplicated so is the handle to a named event created when the pipe
was created; so, if you try and fail to open the event, all
instances of the write-end have been closed. Very simple and it
survives applications being killed via the task manager too.
I'll see if I can use that trick to simplify the UNIX domain
socket patch I submitted. I can't immediately see how, since I
want the code to block until something in particular happens, but
it would simplify the detection of the last close.
p.s. I like the name of the event too: "stupid_pipe" ;-)
More information about the Cygwin-developers