diff --git a/ext/pcntl/pcntl.c b/ext/pcntl/pcntl.c index 6558ef8dcdd04..e11de304b1b79 100644 --- a/ext/pcntl/pcntl.c +++ b/ext/pcntl/pcntl.c @@ -1355,7 +1355,7 @@ static void pcntl_signal_handler(int signo) PCNTL_G(head) = psig; } PCNTL_G(tail) = psig; - PCNTL_G(pending_signals) = 1; + PCNTL_G(pending_signals) = true; if (PCNTL_G(async_signals)) { zend_atomic_bool_store_ex(&EG(vm_interrupt), true); } @@ -1386,7 +1386,7 @@ void pcntl_signal_dispatch(void) zend_fiber_switch_block(); /* Prevent reentrant handler calls */ - PCNTL_G(processing_signal_queue) = 1; + PCNTL_G(processing_signal_queue) = true; queue = PCNTL_G(head); PCNTL_G(head) = NULL; /* simple stores are atomic */ @@ -1418,10 +1418,10 @@ void pcntl_signal_dispatch(void) queue = next; } - PCNTL_G(pending_signals) = 0; + PCNTL_G(pending_signals) = false; /* Re-enable queue */ - PCNTL_G(processing_signal_queue) = 0; + PCNTL_G(processing_signal_queue) = false; /* Re-enable fiber switching */ zend_fiber_switch_unblock(); diff --git a/ext/pcntl/php_pcntl.h b/ext/pcntl/php_pcntl.h index f09ccadcd3cdb..f2cc0d59195f4 100644 --- a/ext/pcntl/php_pcntl.h +++ b/ext/pcntl/php_pcntl.h @@ -43,12 +43,12 @@ struct php_pcntl_pending_signal { ZEND_BEGIN_MODULE_GLOBALS(pcntl) HashTable php_signal_table; - int processing_signal_queue; - struct php_pcntl_pending_signal *head, *tail, *spares; - int last_error; - volatile char pending_signals; + bool processing_signal_queue; + volatile bool pending_signals; bool async_signals; - unsigned num_signals; + uint8_t num_signals; + int last_error; + struct php_pcntl_pending_signal *head, *tail, *spares; ZEND_END_MODULE_GLOBALS(pcntl) #if defined(ZTS) && defined(COMPILE_DL_PCNTL)