Skip to content
Snippets Groups Projects
Commit d709e0df authored by Robert's avatar Robert Committed by Mergify
Browse files

test CmdRun/Terminate: fix do ... finally

This makes the `finally` apply to the last `do` block as intended.
No real effect on the test, though.
parent 5b4c2c40
No related branches found
No related tags found
No related merge requests found
......@@ -6,9 +6,9 @@ import System.Exit (exitFailure)
main = do
mainThreadId <- myThreadId
Signal.installHandler Signal.sigTERM (Signal.Catch $ killThread mainThreadId) Nothing
do
(do
putStrLn "about to sleep"
writeFile "exe.run" "up and running"
threadDelay 10000000 -- 10s
putStrLn "done sleeping"
`finally` putStrLn "exiting"
putStrLn "done sleeping")
`finally` putStrLn "exiting"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment