mirror of
https://github.com/php/php-src.git
synced 2024-09-21 18:07:23 +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:
parent
6e07d060fc
commit
e6ffafa264
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user