Steve> Unfortunately there are doubtless programs out there that do rely
    Steve> on actions being taken at shutdown.

Indeed.  I believe any code which calls atexit.register.

    Steve> Maybe os.exit() could be more widely advertised, though ...

That would be os._exit().  Calling it avoids calls to exit functions
registered with atexit.register().  I believe it is both safe, and
reasonable programming practice for modules to register exit functions.
Both the logging and multiprocessing modules call it.  It's incumbent on the
application programmer to know these details of the modules the app uses
(perhaps indirectly) to know whether or not it's safe/wise to call
os._exit().

-- 
Skip Montanaro - s...@pobox.com - http://smontanaro.dyndns.org/
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to