Bug #80513 [Opn->Nab]: php 7.4 pcntl_signal not catch SIGCHLD signal

From: Date: Mon, 14 Dec 2020 03:41:21 +0000
Subject: Bug #80513 [Opn->Nab]: php 7.4 pcntl_signal not catch SIGCHLD signal
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-231061@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=80513&edit=1 ID: 80513 Updated by: requinix@php.net Reported by: simapple at qq dot com Summary: php 7.4 pcntl_signal not catch SIGCHLD signal -Status: Open +Status: Not a bug Type: Bug -Package: Unknown/Other Function +Package: PCNTL related Operating System: linux PHP Version: 7.4.13 Block user comment: N Private report: N New Comment: Ticks are not reliable and depend on hidden aspects of running code. A plain while(1); loop may not work. Use pcntl_async_signals() instead. https://www.php.net/manual/en/migration71.new-features.php#migration71.new-features.asynchronous-signal-handling Previous Comments: ------------------------------------------------------------------------ [2020-12-14 03:31:43] simapple at qq dot com Description: ------------ php 7.4 pcntl_signal not catch SIGCHLD signal.swicth php 5.5 can catch. Test script: --------------- <?php declare(ticks = 1); pcntl_signal(SIGCHLD,function($signal){ echo "get signal $signal"; pcntl_wait($status); }); $pid = pcntl_fork(); if($pid == 0){ echo " i am child ".getmypid(); sleep(1); exit(); } while(1){ ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=80513&edit=1

« previous php.bugs (#231061) next »