[GHC] #2228: runghc screws up terminal buffering mode and doesn't reset it

GHC trac at galois.com
Mon Apr 28 06:21:25 EDT 2008


#2228: runghc screws up terminal buffering mode and doesn't reset it
--------------------+-------------------------------------------------------
 Reporter:  guest   |          Owner:          
     Type:  bug     |         Status:  new     
 Priority:  normal  |      Milestone:  6.8.3   
Component:  GHCi    |        Version:  6.8.2   
 Severity:  major   |     Resolution:          
 Keywords:          |     Difficulty:  Unknown 
 Testcase:          |   Architecture:  Multiple
       Os:  Linux   |  
--------------------+-------------------------------------------------------
Comment (by igloo):

 Here's complete output from a gnome-terminal:
 {{{
 $ cat cat.hs
 main = putStr =<< getContents
 $ stty -a
 speed 38400 baud; rows 56; columns 80; line = 0;
 intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = M-^?; eol2 =
 M-^?;
 swtch = M-^?; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W;
 lnext = ^V; flush = ^O; min = 1; time = 0;
 -parenb -parodd cs8 hupcl -cstopb cread -clocal -crtscts
 -ignbrk brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon
 -ixoff
 -iuclc ixany imaxbel -iutf8
 opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0
 vt0 ff0
 isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop
 -echoprt
 echoctl echoke
 $ runghc cat.hs
 hheelllloo

 ^D^?^D^D
 cat.hs: exception :: GhcException

 $ stty -a
 speed 38400 baud; rows 56; columns 80; line = 0;
 intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = M-^?; eol2 =
 M-^?;
 swtch = M-^?; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W;
 lnext = ^V; flush = ^O; min = 1; time = 0;
 -parenb -parodd cs8 hupcl -cstopb cread -clocal -crtscts
 -ignbrk brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon
 -ixoff
 -iuclc ixany imaxbel -iutf8
 opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0
 vt0 ff0
 isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop
 -echoprt
 echoctl echoke
 $
 }}}
 Incidentally, I have to press another key after control-C for it to
 actually terminate.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2228#comment:3>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the Glasgow-haskell-bugs mailing list