php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #53518
Patch exitcode.diff revision 2010-12-10 12:56 UTC by ben dot spencer at digitalwindow dot com

Patch exitcode.diff for Program Execution Bug #53518

Patch version 2010-12-10 12:56 UTC

Return to Bug #53518 | Download this patch
Patch Revisions:

Developer: ben.spencer@digitalwindow.com

Index: ext/standard/proc_open.c
===================================================================
--- ext/standard/proc_open.c	(revision 306178)
+++ ext/standard/proc_open.c	(working copy)
@@ -262,8 +262,6 @@
 	if (wait_pid == -1) {
 		FG(pclose_ret) = -1;
 	} else {
-		if (WIFEXITED(wstatus))
-			wstatus = WEXITSTATUS(wstatus);
 		FG(pclose_ret) = wstatus;
 	}
 
Index: main/streams/plain_wrapper.c
===================================================================
--- main/streams/plain_wrapper.c	(revision 306178)
+++ main/streams/plain_wrapper.c	(working copy)
@@ -394,12 +394,6 @@
 			if (data->is_process_pipe) {
 				errno = 0;
 				ret = pclose(data->file);
-
-#if HAVE_SYS_WAIT_H
-				if (WIFEXITED(ret)) {
-					ret = WEXITSTATUS(ret);
-				}
-#endif
 			} else {
 				ret = fclose(data->file);
 				data->file = NULL;
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 23:01:28 2024 UTC