From: Ilia Alshanetsky Date: Thu, 7 Apr 2005 23:08:48 +0000 (+0000) Subject: MFH: Fixed bug #32533 (proc_get_status() returns the incorrect process status). X-Git-Tag: php-5.0.5RC1~462 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d9d53a1d69216580d5084c314c743e818ac58802;p=php MFH: Fixed bug #32533 (proc_get_status() returns the incorrect process status). --- diff --git a/NEWS b/NEWS index c2b08c5661..b77bec8887 100644 --- a/NEWS +++ b/NEWS @@ -7,6 +7,7 @@ PHP NEWS (Ilia) - Fixed bug #32560 (configure looks for incorrect db2 library). (Tony) - Fixed bug #32553 (mmap loads only the 1st 2000000 bytes on Win32). (Ilia) +- Fixed bug #32533 (proc_get_status() returns the incorrect process status). (Ilia) - Fixed bug #32530 (chunk_split() does not append endstr if chunklen is longer then the original string). (Ilia) - Fixed bug #32491 (File upload error - unable to create a temporary file). diff --git a/ext/standard/proc_open.c b/ext/standard/proc_open.c index 1d641f23d2..c6f40cb4cb 100644 --- a/ext/standard/proc_open.c +++ b/ext/standard/proc_open.c @@ -397,6 +397,7 @@ PHP_FUNCTION(proc_get_status) exitcode = WEXITSTATUS(wstatus); } if (WIFSIGNALED(wstatus)) { + running = 0; signaled = 1; #ifdef NETWARE termsig = WIFTERMSIG(wstatus); @@ -408,7 +409,7 @@ PHP_FUNCTION(proc_get_status) stopped = 1; stopsig = WSTOPSIG(wstatus); } - } else { + } else if (wait_pid == -1) { running = 0; } #endif