Double output after Ctrl+C on Windows
C:\Temp>type Test.hs
import Control.Exception
import System.Cmd
main = system "sleep 1m" `finally` putStrLn "goodbye"
C:\Temp>ghc --version
The Glorious Glasgow Haskell Compilation System, version 6.10.1
C:\Temp>ghc --make Test.hs
[1 of 1] Compiling Main ( Test.hs, Test.o )
Linking Test.exe ...
C:\Temp>test.exe
^Cgoodbye
goodbye
C:\Temp>
The ^C is the consoles way of saying that Ctrl+C was pressed - i.e. I ran the program and hit Ctrl+C while the sleep was still ongoing. I can replicate this issue from the DOS prompt and from the Cygwin prompt. It does not occur from GHCi.
Trac metadata
| Trac field | Value |
|---|---|
| Version | 6.10.1 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Runtime System |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture |
Edited by Simon Marlow