Bug #81195 [NEW]: pcntl_fork() cause child process hungup.

From: Date: Wed, 23 Jun 2021 08:09:28 +0000
Subject: Bug #81195 [NEW]: pcntl_fork() cause child process hungup.
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-234598@lists.php.net to get a copy of this message
From: jedemon at gmail dot com Operating system: CentOS7 and Ubuntu16 PHP version: 7.4.20 Package: PCNTL related Bug Type: Bug Bug description:pcntl_fork() cause child process hungup. Description: ------------ From php7.4.11 to php7.4.20, when execute pcntl_fork(), the forked child process will not terminate. Execute this line: php -r "\pcntl_fork(); if(posix_getpid()){pcntl_wait(\$st);} echo 'exit'.PHP_EOL;" and shell will hung. This dose not happen in under PHP7.4.10, nor in above PHP8.0+. Tested on Centos7 and Ubuntu16.04. There is no related info I can find out. Test script: --------------- php -r "\pcntl_fork(); if(posix_getpid()){pcntl_wait(\$st);} echo 'exit'.PHP_EOL;" Expected result: ---------------- exit exit Actual result: -------------- exit -- Edit bug report at https://bugs.php.net/bug.php?id=81195&edit=1 -- Fix committed: https://bugs.php.net/fix.php?id=81195&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=81195&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=81195&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=81195&r=needscript Try newer version: https://bugs.php.net/fix.php?id=81195&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=81195&r=support Expected behavior: https://bugs.php.net/fix.php?id=81195&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=81195&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=81195&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=81195&r=globals PHP version support discontinued: https://bugs.php.net/fix.php?id=81195&r=phptooold Daylight Savings: https://bugs.php.net/fix.php?id=81195&r=dst IIS Stability: https://bugs.php.net/fix.php?id=81195&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=81195&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=81195&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=81195&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=81195&r=mysqlcfg

« previous php.bugs (#234598) next »