[Eventmachine-talk] How to keep a pipe open

Francis Cianfrocca
2007-11-30T15:16:44Z

On Nov 30, 2007 4:41 PM, Duane Johnson <canadaduane at gmail.com> wrote:

> Thanks for your reply, Roger.  No, I think it''s necessary to close
> both sockets--they are to be closed when there is an error condition
> (that''s what the if statement is for--it checks if there was an
error
> while setting the socket nonblocking).
>
> So basically, this is the new, correct code:
>
>        // Set the socketpair nonblocking. Obviously DON''T set
CLOEXEC.
>        if (!SetSocketNonblocking (sv[0])) {
>                close (sv[0]);
>                close (sv[1]);
>                return NULL;
>        }
>
> Can this change go into the core?
>


I can do that as soon as I''m sure that the sv[1] descriptor is never
read by
the reactor.
-------------- next part --------------
An HTML attachment was scrubbed...