Shutting down a cross-platform multithreaded app

Random832 random832 at fastmail.com
Fri Sep 18 17:48:29 EDT 2015


On Fri, Sep 18, 2015, at 17:40, Chris Angelico wrote:
> Bear in mind, though, that Windows has no protection against other
> processes shutting you down.

Neither does Unix. Any process that can send you a signal can send you
SIGKILL.

Of course, what Windows lacks is a generalized way for other processes
to send "less destructive" signals that do give you a chance to clean
up. (You can sometimes send a ctrl-break event, but that's it.) And most
frameworks for "emulating" them (including python's os module) simulate
sending other signals by calling TerminateProcess with an exit status
related to the signal.



More information about the Python-list mailing list