@@ -119,13 +119,6 @@ static PyObject *DefaultHandler;
119
119
static PyObject * IgnoreHandler ;
120
120
static PyObject * IntHandler ;
121
121
122
- /* On Solaris 8, gcc will produce a warning that the function
123
- declaration is not a prototype. This is caused by the definition of
124
- SIG_DFL as (void (*)())0; the correct declaration would have been
125
- (void (*)(int))0. */
126
-
127
- static PyOS_sighandler_t old_siginthandler = SIG_DFL ;
128
-
129
122
#ifdef MS_WINDOWS
130
123
static HANDLE sigint_event = NULL ;
131
124
#endif
@@ -1288,7 +1281,7 @@ PyInit__signal(void)
1288
1281
/* Install default int handler */
1289
1282
Py_INCREF (IntHandler );
1290
1283
Py_SETREF (Handlers [SIGINT ].func , IntHandler );
1291
- old_siginthandler = PyOS_setsig (SIGINT , signal_handler );
1284
+ PyOS_setsig (SIGINT , signal_handler );
1292
1285
}
1293
1286
1294
1287
#ifdef SIGHUP
@@ -1494,14 +1487,11 @@ finisignal(void)
1494
1487
int i ;
1495
1488
PyObject * func ;
1496
1489
1497
- PyOS_setsig (SIGINT , old_siginthandler );
1498
- old_siginthandler = SIG_DFL ;
1499
-
1500
1490
for (i = 1 ; i < NSIG ; i ++ ) {
1501
1491
func = Handlers [i ].func ;
1502
1492
_Py_atomic_store_relaxed (& Handlers [i ].tripped , 0 );
1503
1493
Handlers [i ].func = NULL ;
1504
- if (i != SIGINT && func != NULL && func != Py_None &&
1494
+ if (func != NULL && func != Py_None &&
1505
1495
func != DefaultHandler && func != IgnoreHandler )
1506
1496
PyOS_setsig (i , SIG_DFL );
1507
1497
Py_XDECREF (func );
0 commit comments