ID: 27993
Updated by: [EMAIL PROTECTED]
Reported By: kshukri at empirica-delasasse dot de
-Status: Feedback
+Status: No Feedback
Bug Type: POSIX related
Operating System: debian 3.0 with linux 2.4.24
PHP Version: 4.3.4
New Comment:
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.
Previous Comments:
------------------------------------------------------------------------
[2004-04-14 22:31:22] [EMAIL PROTECTED]
Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves.
A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external
resources such as databases, etc.
If possible, make the script source available online and provide
an URL to it here. Try avoid embedding huge scripts into the report.
------------------------------------------------------------------------
[2004-04-14 11:57:22] kshukri at empirica-delasasse dot de
Description:
------------
pcntl_waitpid with option WNOHANG | WUNTRACED behaves just like WNOHANG
alone, that means it never returns PID of children that have exited
before.
This could be a bug in Linux too.
Please excuse me if I just don't understand the way pcntl_waitpid
should work.
Here's my php config:
./configure --with-apxs --with-config-file-path=/usr/local/lib
--with-zlib --enable-ftp --enable-calendar --enable-track-vars
--with-pgsql --with-unixodbc --with-mysql --enable-sigchild
--enable-pcntl --with-gd --enable-cli --with-snmp
--enable-ucd-snmp-hack --with-openssl --enable-sockets
--prefix=/usr/local/stow/php-4.3.4 --with-curl
Reproduce code:
---------------
function CheckExited () {
while (($c=pcntl_waitpid(-1, $stat, WUNTRACED | WNOHANG))>0) {
ExitTest($c,$stat);
}
}
function ExitTest($c,$stat) { blabla..;}
while ($condition) {
.
.
.
$CHILD_PID = pcntl_fork();
.
.
.
CheckExited();
}
Expected result:
----------------
pcntl_waitpid(...WNOHANG|WUNTRACED) should return PIDs of all children
that have exited since the last call of CheckExited().
Actual result:
--------------
pcntl_waitpid(...WNOHANG|WUNTRACED) doesn't return any PIDs
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=27993&edit=1