|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2020-06-28 13:57 UTC] michael dot vorisek at email dot cz
Description: ------------ reproducible with quote complex code on Windows platform with PHP 7.4.7 NTS issue has gone if processes were stopped properly in the script before a fatal error is thrown php code needs to be checked, it seems, that after a fatal error not all child processes are terminated properly Test script: --------------- // start several processes with proc_open and keep them running // now throw some fatal error like with class with invalid method signature // notice, that PHP process will not finish Expected result: ---------------- php process finishes and there are no child processes left Actual result: -------------- php process hang PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Nov 03 01:00:01 2025 UTC |
Well, without more detailed information this is unlikely to be actionable. I mean there are certainly ways to cause a the parent process to hang, which would not be a bug in PHP, but rather in the userland script, e.g. <?php $descs = [['pipe', 'r'], ['pipe', 'w'], ['pipe', 'w']]; $proc = proc_open('php -r "echo str_repeat(\'*\', 10000);"', $descs, $pipes); set_error_handler(function () use ($pipes) { fwrite($pipes[0], str_repeat('*', 10000)); }); trigger_error('error', E_USER_ERROR); ?> The point is that anonymous pipes are always blocking on Windows, what manifests if there is more data in the pipe than the pipe manager is able to buffer[1]. [1] <https://devblogs.microsoft.com/oldnewthing/20110707-00/?p=10223>