#4248: Poor error message when openFile fails to open named pipe
---------------------------------+------------------------------------------
    Reporter:  Khudyakov         |       Owner:                
        Type:  bug               |      Status:  new           
    Priority:  normal            |   Component:  libraries/base
     Version:  6.12.3            |    Keywords:                
    Testcase:                    |   Blockedby:                
          Os:  Unknown/Multiple  |    Blocking:                
Architecture:  Unknown/Multiple  |     Failure:  None/Unknown  
---------------------------------+------------------------------------------
 openFile cannot open named pipe if no one reads on the other end and fails
 with particularly unhelpful error message. Quick googling shows that it
 opens file in non-blocking mode so failure to open is not bug per se, but
 this fact is not mentioned in documentation.

 Example:

 1. Create named pipe
 {{{
 $ mkfifo /tmp/fifo
 }}}

 2. Now in GHCi:
 {{{
 Prelude> openFile "/tmp/fifo" WriteMode
 *** Exception: /tmp/fifo: openFile: does not exist (No such device or
 address)
 }}}

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4248>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to