[Haskell-cafe] why isn't the thread blocked?

Brandon S. Allbery KF8NH allbery at ece.cmu.edu
Sat Aug 16 12:57:15 EDT 2008

On 2008 Aug 16, at 12:22, Changying Li wrote:
> test.hs: /tmp/b: hGetChar: end of file
> test.hs: /tmp/c: hGetChar: end of file
> I think the thread will be blocked when /tmp/b has nothing.
> but it get EOF, why ?

Because FIFOs are odd.  Open them for read/write to avoid unexpected  
EOFs and unexpected blocking.

brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allbery at kf8nh.com
system administrator [openafs,heimdal,too many hats] allbery at ece.cmu.edu
electrical and computer engineering, carnegie mellon university    KF8NH

More information about the Haskell-Cafe mailing list