summaryrefslogtreecommitdiff
path: root/tests/auto/qfilesystemwatcher/tst_qfilesystemwatcher.cpp
diff options
context:
space:
mode:
authorTijl Coosemans <tijl@coosemans.org>2010-11-26 10:11:11 +0100
committerJoão Abecasis <joao.abecasis@nokia.com>2010-11-26 17:08:20 +0100
commitf7feeee1733b6cb8bfcc157fff1e444068dc290c (patch)
tree58cc03e30b29bc775104a515063a3bfa792c32f6 /tests/auto/qfilesystemwatcher/tst_qfilesystemwatcher.cpp
parente0e9d4ea2cec37243d964a5309be49101d112233 (diff)
downloadqt4-tools-f7feeee1733b6cb8bfcc157fff1e444068dc290c.tar.gz
QKqueueFileSystemWatcherEngine: Use higher file descriptors.
A file descriptor is used for every path to be monitored, but descriptors below FD_SETSIZE (typically 1024) are precious, for use with select(2). To allow the application (and other parts of Qt) to use select(2), try to duplicate the descriptor returned by open(2) above FD_SETSIZE and close(2) the original. However, only do so when the descriptor table is already fairly large (FD_SETSIZE / 2). This keeps the descriptor table small for applications that use only a few descriptors. While here, also set the close-on-exec flag on the (new) descriptor. Merge-request: 2425 Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Diffstat (limited to 'tests/auto/qfilesystemwatcher/tst_qfilesystemwatcher.cpp')
0 files changed, 0 insertions, 0 deletions