summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThies C. Arntzen <thies@php.net>1999-10-13 14:01:47 +0000
committerThies C. Arntzen <thies@php.net>1999-10-13 14:01:47 +0000
commite6ffafa264c4e7655d01d2571cdcc3f98eb89fb7 (patch)
tree9e2b77ddc0d5b64ff3a89c092f5f3a8afbcfc2c8
parent6e07d060fc09ae759aa6693a59cd81efe7c36a63 (diff)
downloadphp-git-e6ffafa264c4e7655d01d2571cdcc3f98eb89fb7.tar.gz
(shell_exec) use pclose for FILE* that has been opened via popen!
@- Fixed zombie problem in shell_exec() and $a = `some_command` @ constructs. (Thies)
-rw-r--r--ext/standard/exec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/standard/exec.c b/ext/standard/exec.c
index bdaa883bc9..df59f58782 100644
--- a/ext/standard/exec.c
+++ b/ext/standard/exec.c
@@ -398,7 +398,7 @@ PHP_FUNCTION(shell_exec)
allocated_space = total_readbytes+EXEC_INPUT_BUF;
return_value->value.str.val = (char *) erealloc(return_value->value.str.val,allocated_space);
}
- fclose(in);
+ pclose(in);
return_value->value.str.val = erealloc(return_value->value.str.val,total_readbytes+1);
return_value->value.str.val[total_readbytes]=0;