Fix for 266206 . close only up to 64k descriptors.
git-svn-id: svn://10.0.0.236/trunk@164588 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
b1bf6bfee6
commit
96934ef216
@ -695,7 +695,7 @@ safe_popen(char *cmd)
|
||||
if (p[1] != 1) dup2(p[1], 1);
|
||||
if (p[1] != 2) dup2(p[1], 2);
|
||||
close(0);
|
||||
for (fd = getdtablesize(); --fd > 2; close(fd))
|
||||
for (fd = PR_MIN(65536,getdtablesize()); --fd > 2; close(fd))
|
||||
;
|
||||
|
||||
/* clean up environment in the child process */
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user