[GHC] #10169: bracket not running the final action on termination through SIGTERM

#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

#10169: bracket not running the final action on termination through SIGTERM -------------------------------------+------------------------------------- Reporter: Kritzefitz | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: libraries/base | Version: 7.6.3 Resolution: | Keywords: Operating System: Linux | Architecture: x86 Type of failure: Incorrect result | Test Case: at runtime | Blocking: Blocked By: | Differential Revisions: Related Tickets: | -------------------------------------+------------------------------------- Comment (by rwbarton): The GHC runtime doesn't install any signal handler for SIGTERM by default, so the program just exits immediately. See ticket:6113#comment:1. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10169#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10169: bracket not running the final action on termination through SIGTERM -------------------------------------+------------------------------------- Reporter: Kritzefitz | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: libraries/base | Version: 7.6.3 Resolution: | Keywords: Operating System: Linux | Architecture: x86 Type of failure: Incorrect result | Test Case: at runtime | Blocking: Blocked By: | Differential Revisions: Related Tickets: 6113 | -------------------------------------+------------------------------------- Changes (by Kritzefitz): * related: => 6113 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10169#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10169: bracket not running the final action on termination through SIGTERM -------------------------------------+------------------------------------- Reporter: Kritzefitz | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: libraries/base | Version: 7.6.3 Resolution: | Keywords: Operating System: Linux | Architecture: x86 Type of failure: Incorrect result | Test Case: at runtime | Blocking: Blocked By: | Differential Revisions: Related Tickets: #6113 | -------------------------------------+------------------------------------- Changes (by Kritzefitz): * related: 6113 => #6113 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10169#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC