From e6ffafa264c4e7655d01d2571cdcc3f98eb89fb7 Mon Sep 17 00:00:00 2001 From: "Thies C. Arntzen" Date: Wed, 13 Oct 1999 14:01:47 +0000 Subject: [PATCH] (shell_exec) use pclose for FILE* that has been opened via popen! @- Fixed zombie problem in shell_exec() and $a = `some_command` @ constructs. (Thies) --- ext/standard/exec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.40.0