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 @@ -1212,6 +1212,7 @@ static void pcntl_signal_handler(int signo)
1212
1212
PCNTL_G (head ) = psig ;
1213
1213
}
1214
1214
PCNTL_G (tail ) = psig ;
1215
+ PCNTL_G (pending_signals ) = 1 ;
1215
1216
}
1216
1217
1217
1218
void pcntl_signal_dispatch ()
@@ -1221,6 +1222,10 @@ void pcntl_signal_dispatch()
1221
1222
sigset_t mask ;
1222
1223
sigset_t old_mask ;
1223
1224
TSRMLS_FETCH ();
1225
+
1226
+ if (!PCNTL_G (pending_signals )) {
1227
+ return ;
1228
+ }
1224
1229
1225
1230
/* Mask all signals */
1226
1231
sigfillset (& mask );
@@ -1258,6 +1263,8 @@ void pcntl_signal_dispatch()
1258
1263
queue = next ;
1259
1264
}
1260
1265
1266
+ PCNTL_G (pending_signals ) = 0 ;
1267
+
1261
1268
/* Re-enable queue */
1262
1269
PCNTL_G (processing_signal_queue ) = 0 ;
1263
1270
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