#2568: hSetBuffering NoBuffering and getChar don't work properly on Windows
-------------------------+--------------------------------------------------
Reporter: igloo | Owner:
Type: bug | Status: new
Priority: normal | Milestone: 6.10 branch
Component: Compiler | Version: 6.9
Severity: normal | Keywords:
Difficulty: Unknown | Testcase:
Architecture: Unknown | Os: Windows
-------------------------+--------------------------------------------------
With this program:
{{{
import System.IO
main = do { hSetBuffering stdin NoBuffering; run }
run = do { getChar; putStrLn "yes"; run }
}}}
if I type
{{{
abc<enter>def<enter><control-C>
}}}
then:
On Linux and OS X I get the desired output:
{{{
$ ./q
ayes
byes
cyes
yes
dyes
eyes
fyes
yes
^Cq: interrupted
}}}
In an MSYS window I get:
{{{
$ ./q
abc
def
}}}
In a cygwin window or a cmd windows I get:
{{{
$ ./q
abc
yes
yes
yes
yes
def
yes
yes
yes
yes
}}}
and the program doesn't die.
SSHing into cygwin I get:
{{{
$ ./q
abc
def
}}}
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2568>
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