On 2008 Oct 19, at 2:39, Stephen Hicks wrote:
I've got one more question now. Suppose I want to do the same thing
on the other side, with two processes *receiving* the data. Is there
a way to tell whether the first process wants input, and if not, wait
for the second process to do anything?
Not readily, because if the process ends up outputting more than a
certain amount (_PIPE_BUF kernel parameter) of data your program will
deadlock. I think you need to forkIO and use MVars to synchronize.
--
brandon s. allbery [solaris,freebsd,perl,pugs,haskell] [EMAIL PROTECTED]
system administrator [openafs,heimdal,too many hats] [EMAIL PROTECTED]
electrical and computer engineering, carnegie mellon university KF8NH
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe