#2189: hSetBuffering stdin NoBuffering doesn't work on Windows
--------------------------------------------+-------------------------------
 Reporter:  FalconNL                        |          Owner:         
     Type:  bug                             |         Status:  new    
 Priority:  high                            |      Milestone:  6.10.2 
Component:  libraries/base                  |        Version:  6.8.2  
 Severity:  normal                          |     Resolution:         
 Keywords:  hsetbuffering buffering buffer  |     Difficulty:  Unknown
 Testcase:                                  |   Architecture:  x86    
       Os:  Windows                         |  
--------------------------------------------+-------------------------------
Comment (by simonmar):

 First, I completely agree that we should be using the Win32 API directly
 instead of the POSIX compatibility layer.  It's that way for historical
 reasons - I think it was easier to port the IO library to Windows in the
 first place by using the POSIX layer.  As you say, #806 would be helped by
 that, but also the Windows side of #635, and #989.

 The call sequence you posted only applies to the non-threaded RTS.  With
 the threaded RTS, everything is in the IO library.  We still end up
 calling `read()`, but directly from Haskell.

 Incedentally, there ''is'' a way to get a `HANDLE` from a file descriptor:
 `_get_osfhandle(fd)`.  You might want to look at
 `libraries\base\cbits\inputReady.c` for some serious console hackery.

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