mirror of
https://github.com/bdnugget/php-src.git
synced 2026-11-08 01:37:30 +00:00
(shell_exec) use pclose for FILE* that has been opened via popen!
@- Fixed zombie problem in shell_exec() and $a = `some_command` @ constructs. (Thies)
This commit is contained in:
1 parent
6e07d060fc
commit
e6ffafa264
1 file changed
+1
-1
+1
-1
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user