handling kill signal

sanju ps sanu1267 at gmail.com
Thu Aug 6 11:25:58 CEST 2009


I want to handle a kill signal..In my program i wrote like this

def handler(signum, frame):
    print "Signal",signum
    delete_temp_file()
    exit(1)
signal.signal(signal.SIGTERM, handler)

And when i tried pkill processid .program is exited but not deleting the
temp file
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20090806/6199e738/attachment.html>


More information about the Python-list mailing list