#3081: Finally run twice on Ctrl+C
-------------------------+--------------------------------------------------
Reporter: NeilMitchell | Owner:
Type: bug | Status: new
Priority: normal | Component: Runtime System
Version: 6.10.1 | Severity: normal
Keywords: | Testcase:
Os: Windows | Architecture: x86
-------------------------+--------------------------------------------------
{{{
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.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3081>
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