Forked from chrisdone/gist:6baa39093104028b2876019ca33c3731
Last active
June 21, 2022 11:36
-
-
Save chrisdone-artificial/fac9039214ca1f1c6035875ef665f3e1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import System.Posix.Signals | |
main = do | |
mainId <- myThreadId | |
_ <- | |
installHandler | |
softwareTermination | |
(CatchOnce | |
(do putStrLn "Received SIGTERM. Killing main thread." | |
killThread mainId)) | |
Nothing | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment