[asterisk-commits] tilghman: branch 1.6.2 r260303 - in /branches/1.6.2: ./ main/app.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Apr 30 01:22:18 CDT 2010


Author: tilghman
Date: Fri Apr 30 01:22:14 2010
New Revision: 260303

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=260303
Log:
Merged revisions 260292 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

........
  r260292 | tilghman | 2010-04-30 01:19:35 -0500 (Fri, 30 Apr 2010) | 13 lines
  
  Don't allow file descriptors to go above 64k, when we're closing them in a fork(2).
  
  This saves time, when, even though the system allows the process limit to be
  that high, the practical limit is much lower.
  
  (closes issue #17223)
   Reported by: dbackeberg
   Patches: 
         20100423__issue17223.diff.txt uploaded by tilghman (license 14)
   Tested by: dbackeberg
........

Modified:
    branches/1.6.2/   (props changed)
    branches/1.6.2/main/app.c

Propchange: branches/1.6.2/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.

Modified: branches/1.6.2/main/app.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.6.2/main/app.c?view=diff&rev=260303&r1=260302&r2=260303
==============================================================================
--- branches/1.6.2/main/app.c (original)
+++ branches/1.6.2/main/app.c Fri Apr 30 01:22:14 2010
@@ -2017,6 +2017,10 @@
 		closedir(dir);
 	} else {
 		getrlimit(RLIMIT_NOFILE, &rl);
+		if (rl.rlim_cur > 65535) {
+			/* A more reasonable value */
+			rl.rlim_cur = 65535;
+		}
 		null = open("/dev/null", O_RDONLY);
 		for (x = n + 1; x < rl.rlim_cur; x++) {
 			if (x != null) {




More information about the asterisk-commits mailing list