Increase the file handle limit.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31046 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stephan Aßmus 2009-06-14 12:16:18 +00:00
parent 568ade58d0
commit c43e377cff

View File

@ -10,6 +10,7 @@
#include <math.h>
#include <stdio.h>
#include <string.h>
#include <sys/resource.h>
#include <Directory.h>
#include <fs_attr.h>
@ -52,6 +53,12 @@ CopyEngine::CopyEngine(const BMessenger& messenger, BMessage* message)
if (fWriterThread >= B_OK)
resume_thread(fWriterThread);
// ask for a bunch more file descriptors so that nested copying works well
struct rlimit rl;
rl.rlim_cur = 512;
rl.rlim_max = RLIM_SAVED_MAX;
setrlimit(RLIMIT_NOFILE, &rl);
}