atexit/signal for non-interactive jobs

Cameron Simpson cs at zip.com.au
Wed May 26 18:35:05 EDT 2010


On 26May2010 20:19, kj <no.email at please.post> wrote:
| If I start the script interactively and after a few seconds (i.e.
| before it terminates) I hit Ctrl-C (which sends a TERM signal to
| the process), the wrapup function gets called as desired (although
| this action appears to be triggered by atexit, and not by the
| handler for SIGTERM, which apparently never gets called).

I hate to tell you this, but ^C sends SIGINT, not SIGTERM.
-- 
Cameron Simpson <cs at zip.com.au> DoD#743
http://www.cskk.ezoshosting.com/cs/

To have no errors
Would be life without meaning
No struggle, no joy
- Haiku Error Messages http://www.salonmagazine.com/21st/chal/1998/02/10chal2.html



More information about the Python-list mailing list