#3808: piping  binary files sometimes fail
----------------------------+-----------------------------------------------
  Reporter:  paolino        |          Owner:                
      Type:  bug            |         Status:  new           
  Priority:  high           |      Milestone:  6.12.2        
 Component:  Compiler       |        Version:  6.12.2        
Resolution:                 |       Keywords:  pipe binary IO
Difficulty:                 |             Os:  Linux         
  Testcase:                 |   Architecture:  x86_64 (amd64)
   Failure:  Runtime crash  |          Patch:  0             
----------------------------+-----------------------------------------------
Changes (by guest):

  * owner:  igloo =>
  * status:  closed => new
  * version:  6.12.1 => 6.12.2
  * resolution:  fixed =>
  * patch:  => 0


Comment:

 This patch breaks current behavior with 6.12.2 and handles derived from
 network sockets. (At least with OpenSUSE) (I don't know if this is a
 problem more generally.) The patch description says that hGet returns a
 short read if it would otherwise block, and only blocks if there is no
 data to read. However, e.g. happstack, which uses lazy hGetContents over a
 handle created from a network socket, indeed does block. Substituting the
 prior version of hGetContents which uses hGetNonBlocking + hWaitForInput +
 hIsEOF fixes this behavior.

 This should either be reverted, or the previous version should be exposed
 as well, with an appropriate note about differing behaviors.
 --sclv

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3808#comment:11>
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