no cleanup on TERM signal

Yves Dorfsman yves at zioup.com
Fri May 2 00:36:06 EDT 2008


I did a few tests with this script:

class byebye:

   def __del__(self):
     print 'Bye, bye...'


x = byebye()


x.del() gets executed if:
-I del x, then run gc.collect()
-simply exit the script
-get the script to abort on an exception

But if I kill it with the default signal TERM, the script dies, but I don't 
get the message, so I am assuming that python isn't taking the time to 
cleanup, even though that is (was) what TERM was intended for.

Has this been discussed before ? Is worth a suggestion (PEP) ?


-- 
Yves.
http://www.SollerS.ca



More information about the Python-list mailing list