finally part run twice on Ctrl-C
Philip K.F. Hölzenspies
p.k.f.holzenspies at utwente.nl
Fri Feb 27 03:37:18 EST 2009
> I've got the following code:
> import Control.Exception
> import System.Cmd
> main = system "sleep 1m" `finally` putStrLn "goodbye"
> When compiled with GHC 220.127.116.1190225, if I hit Ctrl-C during the
> sleep, I get the goodbye printed twice. If I leave evaluation to
> finish normally I get goodbye once. Is this a bug?
Dear Neil, et al.
Just to let you know; I tried it on the release version of 6.10.1 and it
worked as expected (first run, I waited; second I pressed Ctrl-C):
If not coming from system differences, the bug should sit in recent code.
More information about the Glasgow-haskell-users