Kaydet (Commit) 7ff20ac9 authored tarafından Guido van Rossum's avatar Guido van Rossum

Change the signal finialization so that it also resets the signal

handlers.  After this has been called, our signal handlers are no
longer active!
üst 615022fb
......@@ -513,13 +513,19 @@ static void
finisignal()
{
int i;
PyObject *func;
signal(SIGINT, old_siginthandler);
old_siginthandler = SIG_DFL;
for (i = 1; i < NSIG; i++) {
func = Handlers[i].func;
Handlers[i].tripped = 0;
Py_XDECREF(Handlers[i].func);
Handlers[i].func = NULL;
if (i != SIGINT && func != NULL && func != Py_None &&
func != DefaultHandler && func != IgnoreHandler)
signal(i, SIG_DFL);
Py_XDECREF(func);
}
Py_XDECREF(IntHandler);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment