This is the nice trick. It works!
Thank you so much.

Jian

-----Original Message-----
From: uclibc-boun...@uclibc.org [mailto:uclibc-boun...@uclibc.org] On Behalf Of 
Rich Felker
Sent: Thursday, June 02, 2011 4:44 PM
To: uclibc@uclibc.org
Subject: Re: named pipe is borken and proposed fix

On Thu, Jun 02, 2011 at 02:00:41PM -0700, Jian Peng wrote:
> " The generally accepted, portable way to handle sequential reads
> on a FIFO is for the reader to also open the writing end of the
> FIFO (and do nothing with it) for as long as it wants to read."
> 
> It did not work. I am not sure whether it is possible to open same
> FIFO, and use one as reader, and use second as writer, in same user
> process.

Of course it can. The easiest way to do this is open the FIFO with the
O_RDWR flag. Then you will never get EOF.

Rich
_______________________________________________
uClibc mailing list
uClibc@uclibc.org
http://lists.busybox.net/mailman/listinfo/uclibc


_______________________________________________
uClibc mailing list
uClibc@uclibc.org
http://lists.busybox.net/mailman/listinfo/uclibc

Reply via email to