This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author pakal
Recipients georg.brandl, pakal
Date 2009-05-07.18:53:13
SpamBayes Score 3.81959e-09
Marked as misclassified No
Message-id <1241722395.44.0.880118568656.issue5962@psf.upfronthosting.co.za>
In-reply-to
Content
Hello

I once was rather confused, because nothing in the sys and os modules
mentionned the behaviours that the exit() and _exit() functions were
supposed to have when called inside a non-main thread.
I've eventually found in multithreading-related docs that sys.exit()
made only the calling thread exit (without affecting the other threads
and the application), and I've eventually guessed that on the other
side, os._exit() always terminated the application wthout caring about
other threads or open files etc.
But I don't know if this will always be the case, or if using other
threading libraries than the standard one might change this semantics.

And concerning return code, I've found nothing indicating what happened
when different threads returned different codes. My experiments show
that only the main thread's return code is taken into account, but maybe
it's platform dependent (I'm on windows vista) ? 

So well, maybe we should add in the doc of sys and os some comments
about multithreading and returning codes, even if it is to say that
those are implementation details or platform dependant B-)

Regards, 
pascal
History
Date User Action Args
2009-05-07 18:53:15pakalsetrecipients: + pakal, georg.brandl
2009-05-07 18:53:15pakalsetmessageid: <1241722395.44.0.880118568656.issue5962@psf.upfronthosting.co.za>
2009-05-07 18:53:14pakallinkissue5962 messages
2009-05-07 18:53:13pakalcreate