]> granicus.if.org Git - php/commitdiff
MFH: Fixed bug #32533 (proc_get_status() returns the incorrect process status).
authorIlia Alshanetsky <iliaa@php.net>
Thu, 7 Apr 2005 23:08:48 +0000 (23:08 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Thu, 7 Apr 2005 23:08:48 +0000 (23:08 +0000)
NEWS
ext/standard/proc_open.c

diff --git a/NEWS b/NEWS
index c2b08c5661f24a498959a3992fa674c24cad10c7..b77bec8887ec3ba1ce3e3da54599f6a6fe8c59d6 100644 (file)
--- 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).
index 1d641f23d2901a1385780f5f2581029b97b19eeb..c6f40cb4cb80a2f3784047e5069f7a3ba0771797 100644 (file)
@@ -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