On 10/23/06, Peter Daum <[EMAIL PROTECTED]> wrote:

I am trying to figure out a way to write data to a fifo without
knowing whether there is a reader available and without ever blocking.

Although you could use the four-arg select() to detect ready-to-write,
there's no way to avoid filling the buffer and blocking without
checking select() again after each byte.

One solution, if it works in your situation, might be to fork a child
process which will write the data, blocking as needed, allowing the
main program to continue without blocking.

Good luck with it!

--Tom Phoenix

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to