Re: os._exit vs. sys.exit

2005-07-29 Thread Peter Hansen
Bryan wrote: > Thanks for the clarifications. One more question, can I catch this > exception in my main thread and then do another sys.exit() to kill the whole > process? Not as such. Exceptions can be caught only in the thread in which they are raised. There are tricky techniques to change

Re: os._exit vs. sys.exit

2005-07-29 Thread Bryan
"Peter Hansen" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Andrew Dalke wrote: >> sys.exit() is identical to "raise SystemExit()". It raises a Python >> exception which may be caught at a higher level in the program stack. > > And which *is* caught at the highest levels of thre

Re: os._exit vs. sys.exit

2005-07-29 Thread Peter Hansen
Andrew Dalke wrote: > sys.exit() is identical to "raise SystemExit()". It raises a Python > exception which may be caught at a higher level in the program stack. And which *is* caught at the highest levels of threading.Thread objects (which Timer is based on). Exceptions raised (and caught or n

Re: os._exit vs. sys.exit

2005-07-28 Thread Andrew Dalke
Bryan wrote: > Why does os._exit called from a Python Timer kill the whole process while > sys.exit does not? On Suse. os._exit calls the C function _exit() which does an immediate program termination. See for example http://developer.apple.com/documentation/Darwin/Reference/ManPages/man2/_e

os._exit vs. sys.exit

2005-07-28 Thread Bryan
Quick question: Why does os._exit called from a Python Timer kill the whole process while sys.exit does not? On Suse. Bryan -- http://mail.python.org/mailman/listinfo/python-list