
On Tue, Nov 23, 2010 at 12:55, matthew coolbeth
Hello, all.
Three questions:
1> What, if anything, can I do in a Haskell program to do blocking reads from a Linux FIFO? For the curious, there is a small program below that doesn't block, but immediately terminates because of an EOF
2> How could I have found the answer to this question on my own? (The documentation that Google found for me was not completely adequate)
3> Is this sort of question generally regarded as too unixy or not haskelly enough to be appropriate for this mailing list?
The behaviour is as expected from reading the documentation on hGetLine (http://hackage.haskell.org/packages/archive/haskell98/latest/doc/html/IO.htm...). The same seems to be true for all functions in IO, so I suspect you'll have to go down to a lower level where you have more control over this behaviour, e.g. by using th fd* functions in System.Posix.IO. /M -- Magnus Therning OpenPGP: 0xAB4DFBA4 email: magnus@therning.org jabber: magnus@therning.org twitter: magthe http://therning.org/magnus