Making a timebomb

Peter Hansen peter at engcorp.com
Sun Aug 7 08:43:51 EDT 2005


Cantankerous Old Git wrote:
> Peter Hansen wrote:
>> Cantankerous Old Git wrote:
>>> The dirty way, which can leave corrupt half-written files and other 
>>> nasties, is something like sys.exit().
>>
>> sys.exit() won't help you if your server is running in the main 
>> thread, nor if your server thread is not marked as a daemon, but that 
>> does raise another possibility.  
> 
> I assume you know that I actually meant System.exit(). Why do you think 
> that won't help?

No, I didn't know that, but if you were confused the first time, I think 
  you're getting even more confused now.  What is System.exit()?  I 
don't have one, and have never seen it mentioned.  Perhaps you meant 
SystemExit, the exception that's raised when you call sys.exit()?  If 
so, I still don't see your point, because there's no difference between 
the two in this context.

Maybe you meant os._exit()?  Now *that* one is messy, and will work as 
you described.

-Peter



More information about the Python-list mailing list