@@ -54,14 +54,6 @@ Interrupt and signal handling for Cython
54
54
#include <sys/prctl.h>
55
55
#endif
56
56
#include <Python.h>
57
- #if HAVE_PARI
58
- #include <pari/pari.h>
59
- #else
60
- /* Fake PARI variables */
61
- static int PARI_SIGINT_block = 0 ;
62
- static int PARI_SIGINT_pending = 0 ;
63
- #define paricfg_version NULL
64
- #endif
65
57
66
58
// Custom signal handling of other packages.
67
59
#define MAX_N_CUSTOM_HANDLERS 16
@@ -94,8 +86,6 @@ void custom_set_pending_signal(int sig){
94
86
}
95
87
96
88
#if HAVE_WINDOWS_H
97
- /* We must include <windows.h> after <pari.h>
98
- * See https://github.com/sagemath/cysignals/issues/107 */
99
89
#include <windows.h>
100
90
#endif
101
91
#include "struct_signals.h"
@@ -245,7 +235,7 @@ static void cysigs_interrupt_handler(int sig)
245
235
246
236
if (cysigs .sig_on_count > 0 )
247
237
{
248
- if (!cysigs .block_sigint && !PARI_SIGINT_block && ! custom_signal_is_blocked ())
238
+ if (!cysigs .block_sigint && !custom_signal_is_blocked ())
249
239
{
250
240
/* Raise an exception so Python can see it */
251
241
do_raise_exception (sig );
@@ -268,7 +258,6 @@ static void cysigs_interrupt_handler(int sig)
268
258
if (cysigs .interrupt_received != SIGHUP && cysigs .interrupt_received != SIGTERM )
269
259
{
270
260
cysigs .interrupt_received = sig ;
271
- PARI_SIGINT_pending = sig ;
272
261
custom_set_pending_signal (sig );
273
262
}
274
263
}
@@ -431,7 +420,6 @@ static void _sig_on_interrupt_received(void)
431
420
do_raise_exception (cysigs .interrupt_received );
432
421
cysigs .sig_on_count = 0 ;
433
422
cysigs .interrupt_received = 0 ;
434
- PARI_SIGINT_pending = 0 ;
435
423
custom_signal_unblock ();
436
424
437
425
#if HAVE_SIGPROCMASK
@@ -444,11 +432,9 @@ static void _sig_on_interrupt_received(void)
444
432
static void _sig_on_recover (void )
445
433
{
446
434
cysigs .block_sigint = 0 ;
447
- PARI_SIGINT_block = 0 ;
448
435
custom_signal_unblock ();
449
436
cysigs .sig_on_count = 0 ;
450
437
cysigs .interrupt_received = 0 ;
451
- PARI_SIGINT_pending = 0 ;
452
438
custom_set_pending_signal (0 );
453
439
454
440
#if HAVE_SIGPROCMASK
0 commit comments