When an error occurs to incrase the node monitor limit, reset the current

value and don't keep it at the value we wanted it increased to.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35112 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stephan Aßmus 2010-01-17 12:15:50 +00:00
parent 2ee53d23fa
commit 0bf7f1f8cd

View File

@ -1463,8 +1463,10 @@ TTracker::NeedMoreNodeMonitors()
struct rlimit rl;
rl.rlim_cur = fNodeMonitorCount;
rl.rlim_max = RLIM_SAVED_MAX;
if (setrlimit(RLIMIT_NOVMON, &rl) < 0)
if (setrlimit(RLIMIT_NOVMON, &rl) < 0) {
fNodeMonitorCount -= kNodeMonitorBumpValue;
return errno;
}
return B_OK;
}