SIGTERM handling

Manlio Perillo manlio_perilloNO at
Fri May 5 11:30:20 CEST 2006


I have tried this script:

from ctypes import cdll, c_int
from signal import SIGTERM, SIGINT
from time import sleep

msvcrt = cdll.LoadLibrary("MSVCR71") # is this the lib to use?
sig = c_int(SIGTERM)
raise_ = getattr(msvcrt, "raise")

The problem is that SIGTERM causes the program to exit (without calling
atexit registered functions).

In the MSDN documentations it is written that SIGTERM is by default
ignored and in the Python documentation for signal module it is written
that there should be no handler for SIGTERM.

Thanks  Manlio Perillo

More information about the Python-list mailing list