
19 Oct
2008
19 Oct
'08
11:07 a.m.
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] allbery@kf8nh.com system administrator [openafs,heimdal,too many hats] allbery@ece.cmu.edu electrical and computer engineering, carnegie mellon university KF8NH