summaryrefslogtreecommitdiff
path: root/ext/standard/proc_open.c
diff options
context:
space:
mode:
authorKalle Sommer Nielsen <kalle@php.net>2009-07-20 04:31:07 +0000
committerKalle Sommer Nielsen <kalle@php.net>2009-07-20 04:31:07 +0000
commit5c1d0c3eabf3f40b8686fea39c87a6d2c1914164 (patch)
tree0130636d71d0427d9c81d30039efde507a475169 /ext/standard/proc_open.c
parent12ef53b2045a49d18aea85fac59beb2f99589f0b (diff)
downloadphp-git-5c1d0c3eabf3f40b8686fea39c87a6d2c1914164.tar.gz
Fix Windows build
Diffstat (limited to 'ext/standard/proc_open.c')
-rw-r--r--ext/standard/proc_open.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/ext/standard/proc_open.c b/ext/standard/proc_open.c
index a1397bba73..a0716b4c6d 100644
--- a/ext/standard/proc_open.c
+++ b/ext/standard/proc_open.c
@@ -279,9 +279,9 @@ static void proc_open_rsrc_dtor(zend_rsrc_list_entry *rsrc TSRMLS_DC)
wait_pid = waitpid(proc->child, &wstatus, 0);
} while (wait_pid == -1 && errno == EINTR);
- if (wait_pid == -1)
+ if (wait_pid == -1) {
FG(pclose_ret) = -1;
- else {
+ } else {
if (WIFEXITED(wstatus))
wstatus = WEXITSTATUS(wstatus);
FG(pclose_ret) = wstatus;
@@ -291,7 +291,9 @@ static void proc_open_rsrc_dtor(zend_rsrc_list_entry *rsrc TSRMLS_DC)
FG(pclose_ret) = -1;
#endif
_php_free_envp(proc->env, proc->is_persistent);
+#if !defined(PHP_WIN32) && !defined(NETWARE)
_php_free_argv(proc->argv, proc->is_persistent);
+#endif
pefree(proc->command, proc->is_persistent);
pefree(proc, proc->is_persistent);