tweag / sparkle

Haskell on Apache Spark.
BSD 3-Clause "New" or "Revised" License
447 stars 30 forks source link

Handle signals and termination of main #126

Open facundominguez opened 6 years ago

facundominguez commented 6 years ago

Sending the SIGTERM or SIGINT signals to a sparkle application sends the signals to the process. Handlers should be installed to terminate the thread running  the main function of Haskell. The main thread in turn cannot die with a Haskell exception, or the RTS will kill the application on the spot without giving spark a chance to cleanup the temporary files it has created.