#43373 [Com]: untraceable "Fatal error: pcntl_fork(): Error 35"
| From: | development at domain51 dot com | Date: | Mon, 26 Nov 2007 23:15:42 +0000 |
| Subject: | #43373 [Com]: untraceable "Fatal error: pcntl_fork(): Error 35" | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-120111@lists.php.net to get a copy of this message | ||
ID: 43373
Comment by: development at domain51 dot com
Reported By: trot at plotinka dot ru
Status: Open
Bug Type: PCNTL related
Operating System: Unix
PHP Version: 5.2.5
New Comment:
I just ran into this issue as well... I was testing PHP's speed at
forking N processes and I hit an issue where the OS wasn't able to fork
any more processes. Instead of getting a -1 response, the code
referenced below triggers a fatal error and halts PHP.
In other words, the check on line 227 referenced by trot at plotinka
dot ru should be deleted. "-1" is a valid return value and should not
trigger an error any failure is encountered during the fork.
Previous Comments:
------------------------------------------------------------------------
[2007-11-26 12:46:57] trot at plotinka dot ru
Fatal error on failure.
But in manual:
"On failure, a -1 will be returned in the parent's context"
http://php.net/pcntl_fork
thx
------------------------------------------------------------------------
[2007-11-25 17:32:14] jani@php.net
Exactly what are you reporting here? What's the bug?
------------------------------------------------------------------------
[2007-11-23 08:07:17] trot at plotinka dot ru
ext/pcntl/pcntl.c line 227
delete:
if (id == -1) {
php_error_docref(NULL TSRMLS_CC, E_ERROR, "Error %d",
errno);
}
------------------------------------------------------------------------
[2007-11-22 11:57:20] trot at plotinka dot ru
Description:
------------
untraceable "Fatal error: pcntl_fork(): Error 35"
P.S.: CLI mode.
Reproduce code:
---------------
$pid = pcntl_fork();
Expected result:
----------------
$pid == -1; // true
Actual result:
--------------
Fatal error: pcntl_fork(): Error 35 in ...
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=43373&edit=1