finally part run twice on Ctrl-C

Neil Mitchell ndmitchell at
Thu Feb 26 05:31:58 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, 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?



More information about the Glasgow-haskell-users mailing list