Don't allow file descriptors to go above 64k, when we're closing them in a fork(2).
authorTilghman Lesher <tilghman@meg.abyt.es>
Fri, 30 Apr 2010 06:19:35 +0000 (06:19 +0000)
committerTilghman Lesher <tilghman@meg.abyt.es>
Fri, 30 Apr 2010 06:19:35 +0000 (06:19 +0000)
commit623ba816fa650234b416947d21c7418e435262ae
tree0542418b16e63298856156c912be948b30973373
parente940ef8c4cd522f26d7f496feb8028164e7f759f
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.  Also introduce an additional
optimization, in the form of using the CLOEXEC flag to close descriptors at
the right time.

(closes issue #17223)
 Reported by: dbackeberg
 Patches:
       20100423__issue17223.diff.txt uploaded by tilghman (license 14)
 Tested by: dbackeberg

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@260292 65c4cc65-6c06-0410-ace0-fbb531ad65f3
main/strcompat.c