[GHC] #10169: bracket not running the final action on termination through SIGTERM
GHC
ghc-devs at haskell.org
Wed Mar 18 23:04:48 UTC 2015
#10169: bracket not running the final action on termination through SIGTERM
-------------------------------------+-------------------------------------
Reporter: Kritzefitz | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: | Version: 7.6.3
libraries/base | Operating System: Linux
Keywords: | Type of failure: Incorrect result
Architecture: x86 | at runtime
Test Case: | Blocked By:
Blocking: | Related Tickets:
Differential Revisions: |
-------------------------------------+-------------------------------------
If a program compiled with GHC receives a SIGTERM signal, while in a
bracket, the final action of the bracket isn't executed. This can be
tested with this program:
{{{#!hs
import Control.Exception
import Control.Concurrent
main = bracket (return "ending")
(\x -> putStrLn x)
(\_ -> threadDelay 10000000000)
}}}
When running this and interrupting with ctrl-c (thus SIGINT) it prints
"ending", like expected. When interrupting it with {{{killall -TERM
test}}} (assuming the program was named test) "ending" isn't printed and
the program terminates immediately. It prints a system specific message
though.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10169>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list