Bug #81358 [Opn->Fbk]: PHP hangs when the first signal sent
| From: | nikic@php.net | Date: | Mon, 16 Aug 2021 12:35:53 +0000 |
| Subject: | Bug #81358 [Opn->Fbk]: PHP hangs when the first signal sent | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-235846@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=81358&edit=1
ID: 81358
Updated by: nikic@php.net
Reported by: abolfazl dot ziaratban at gmail dot com
Summary: PHP hangs when the first signal sent
-Status: Open
+Status: Feedback
Type: Bug
Package: Program Execution
Operating System: CentOS
PHP Version: 8.0.9
Block user comment: N
Private report: N
New Comment:
Can you clarify what the actual issue here is? Is it the "does not run" part? That seems
expected to me, because the SIGUSR1 default action is to terminate the process, so if the signal
arrives before the echo can execute, nothing will be printed.
Or is there an actual hang here, and if so, how does it look like. Does the outer "php
test1.php" call itself hang indefinitely?
Previous Comments:
------------------------------------------------------------------------
[2021-08-14 02:49:35] abolfazl dot ziaratban at gmail dot com
fix bug :
$proc = proc_open('php test2.php',[],$_);
sleep(1); #fix
posix_kill(proc_get_status($proc)['pid'],SIGUSR1);
------------------------------------------------------------------------
[2021-08-14 02:47:44] abolfazl dot ziaratban at gmail dot com
.
------------------------------------------------------------------------
[2021-08-14 02:01:47] abolfazl dot ziaratban at gmail dot com
Description:
------------
Hi
PHP hangs when I open php with proc_open and send a signal.
Test script:
---------------
test2.php
echo 'Test'; #does not run
test1.php
$proc = proc_open('php test2.php',[],$_);
posix_kill(proc_get_status($proc)['pid'],SIGUSR1);
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=81358&edit=1