System signals

Sean Kelly sean at invisibleduck.org
Sat Apr 28 14:08:06 PDT 2012


On Apr 28, 2012, at 1:04 PM, "Andrea Fontana" <nospam at example.com> wrote:

> How can i catch kill signal to gracefully shutdown my app?

Gracefully?  That's tough. I'd set a flag, then exit the signal handler. All threads should periodically check the flag and throw an Error if they see it. Or an Exception you're sure won't be caught.  You really can't do much in a signal handler, so it is t safe to do something fancier there. 


More information about the Digitalmars-d mailing list