TCP problems

Conrad Scott Conrad.Scott@dsl.pipex.com
Mon Jul 29 14:44:00 GMT 2002


"Christopher Faylor" <cgf@redhat.com> wrote:
> If you're just talking about system-wide closes then you could
use
> the technique currently employed in pipe.cc where events are
used
> 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.

Thanks,

// Conrad

p.s. I like the name of the event too: "stupid_pipe" ;-)





More information about the Cygwin-developers mailing list