File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -1225,6 +1225,7 @@ static void pcntl_signal_handler(int signo)
1225
1225
PCNTL_G (head ) = psig ;
1226
1226
}
1227
1227
PCNTL_G (tail ) = psig ;
1228
+ PCNTL_G (pending_signals ) = 1 ;
1228
1229
}
1229
1230
1230
1231
void pcntl_signal_dispatch ()
@@ -1234,6 +1235,10 @@ void pcntl_signal_dispatch()
1234
1235
sigset_t mask ;
1235
1236
sigset_t old_mask ;
1236
1237
TSRMLS_FETCH ();
1238
+
1239
+ if (!PCNTL_G (pending_signals )) {
1240
+ return ;
1241
+ }
1237
1242
1238
1243
/* Mask all signals */
1239
1244
sigfillset (& mask );
@@ -1273,6 +1278,8 @@ void pcntl_signal_dispatch()
1273
1278
queue = next ;
1274
1279
}
1275
1280
1281
+ PCNTL_G (pending_signals ) = 0 ;
1282
+
1276
1283
/* Re-enable queue */
1277
1284
PCNTL_G (processing_signal_queue ) = 0 ;
1278
1285
Original file line number Diff line number Diff line change @@ -69,6 +69,7 @@ ZEND_BEGIN_MODULE_GLOBALS(pcntl)
69
69
int processing_signal_queue ;
70
70
struct php_pcntl_pending_signal * head , * tail , * spares ;
71
71
int last_error ;
72
+ volatile char pending_signals ;
72
73
ZEND_END_MODULE_GLOBALS (pcntl )
73
74
74
75
#ifdef ZTS
You can’t perform that action at this time.
0 commit comments