@@ -118,13 +118,6 @@ static PyObject *DefaultHandler;
118118static PyObject * IgnoreHandler ;
119119static PyObject * IntHandler ;
120120
121- /* On Solaris 8, gcc will produce a warning that the function
122- declaration is not a prototype. This is caused by the definition of
123- SIG_DFL as (void (*)())0; the correct declaration would have been
124- (void (*)(int))0. */
125-
126- static PyOS_sighandler_t old_siginthandler = SIG_DFL ;
127-
128121#ifdef MS_WINDOWS
129122static HANDLE sigint_event = NULL ;
130123#endif
@@ -1291,7 +1284,7 @@ PyInit__signal(void)
12911284 /* Install default int handler */
12921285 Py_INCREF (IntHandler );
12931286 Py_SETREF (Handlers [SIGINT ].func , IntHandler );
1294- old_siginthandler = PyOS_setsig (SIGINT , signal_handler );
1287+ PyOS_setsig (SIGINT , signal_handler );
12951288 }
12961289
12971290#ifdef SIGHUP
@@ -1497,14 +1490,11 @@ finisignal(void)
14971490 int i ;
14981491 PyObject * func ;
14991492
1500- PyOS_setsig (SIGINT , old_siginthandler );
1501- old_siginthandler = SIG_DFL ;
1502-
15031493 for (i = 1 ; i < NSIG ; i ++ ) {
15041494 func = Handlers [i ].func ;
15051495 _Py_atomic_store_relaxed (& Handlers [i ].tripped , 0 );
15061496 Handlers [i ].func = NULL ;
1507- if (i != SIGINT && func != NULL && func != Py_None &&
1497+ if (func != NULL && func != Py_None &&
15081498 func != DefaultHandler && func != IgnoreHandler )
15091499 PyOS_setsig (i , SIG_DFL );
15101500 Py_XDECREF (func );
0 commit comments