From 96934ef216d439476f05fa1645f71e5b2d565577 Mon Sep 17 00:00:00 2001 From: "julien.pierre.bugs%sun.com" Date: Fri, 29 Oct 2004 06:14:22 +0000 Subject: [PATCH] Fix for 266206 . close only up to 64k descriptors. git-svn-id: svn://10.0.0.236/trunk@164588 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/security/nss/lib/freebl/unix_rand.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mozilla/security/nss/lib/freebl/unix_rand.c b/mozilla/security/nss/lib/freebl/unix_rand.c index 759d755e8d4..5b0f28cc4ba 100644 --- a/mozilla/security/nss/lib/freebl/unix_rand.c +++ b/mozilla/security/nss/lib/freebl/unix_rand.c @@ -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 */