[Eventmachine-talk] How to keep a pipe open

Roger Pack
2007-11-29T18:19:18Z

maybe there''s an extra close in there?

On Nov 29, 2007 2:51 PM, Duane Johnson <canadaduane at gmail.com>
wrote:
> Ah-hah!
>
> I think I''ve found the problem.  Inside the Socketpair constructor
on
> line 1386 of em.cpp, it sets both the input AND output sockets to non-
> blocking:
>
> >       // Set the socketpair nonblocking. Obviously DON''T set
CLOEXEC.
> >       if (!SetSocketNonblocking (sv[0]) || !SetSocketNonblocking
(sv[1])) {
> >               close (sv[0]);
> >               close (sv[1]);
> >               return NULL;
> >       }
>
>
> By removing the SetSocketNonblocking(sv[1]) from the line, the TeX
> command-line application pauses and waits for EventMachine to send
> data, as expected.
>
> If anyone is more familiar with this subject, I would appreciate some
> feedback here.  Is there some reason the output stream is set to non-
> blocking?
>
>
> Thanks,
> Duane Johnson
> _______________________________________________
> Eventmachine-talk mailing list
> Eventmachine-talk at rubyforge.org
> http://rubyforge.org/mailman/listinfo/eventmachine-talk
>



--
-Roger Pack
For God hath not given us the spirit of fear; but of power, and of
love, and of a sound mind" -- 2 Timothy 1:7