Changed behaviour when reading from FIFOs!

Volker Stolz stolz at hyperion.informatik.rwth-aachen.de
Tue Oct 30 05:02:20 EST 2001


On Mon, Oct 29, 2001 at 02:52:25PM -0000, Simon Marlow wrote:
> > The blocking is essential since I need to be able to use MVars
> > between the threadWaitRead & the hGetLine (remember the note I
> > sent about fork()ing).
> 
> Sorry, I can't remember that - could you remind me?  The hGetLine
> already blocks if there's no data in the FIFO, the extra threadWaitRead
> will only work if the Handle is in NoBuffering mode, because otherwise
> there might be data in the handle buffer waiting to be read which
> threadWaitRead would be unable to detect.

I'm using 'fork' (the real thing, not forkIO), in a Concurrent
Haskell programm and I need a way to lock out multiple readers
from the same file handle because of the sharing when forking.
-- 
Volker Stolz * stolz at i2.informatik.rwth-aachen.de * PGP + S/MIME




More information about the Glasgow-haskell-bugs mailing list