by charles-leonard.couvrette@[EMAIL PROTECTED]
(Charles)
Apr 14, 2004 at 02:05 PM
charles-leonard.couvrette@[EMAIL PROTECTED]
(Charles) wrote in message
news:<72405e4a.0404130629.6b141158@[EMAIL PROTECTED]
>...
> Hi,
>
> I got a c++ program who created a named pipe to communicate with his
> child: a perl script. The perl script just open the named pipe (
> open(PIPE, "> pipename") ) and print data to it. On the other side I
> use a separate thread to read the message print by the child. The
> function I use is ReadFile and the problem is that it block until I
> close the pipe on the other side (perl script). I want my data live,
> not when the script finish his execution. I've try to flush the output
> in my perl script using PIPE->autoflush but it result in a BROKEN_PIPE
> error in ReadFile. Is there a way to tell the ReadFile function to
> read the data the script just output without blocking until the pipe
> is close?
>
> Thanks
>
> Charles
Forget what I said ... I found the solution... anonymous pipe is the way
to go :)
Charles