security check

This commit is contained in:
Axel Kittenberger 2010-12-07 12:50:31 +00:00
parent 8b2e05a681
commit 2f21d0f0b8
1 changed files with 5 additions and 1 deletions

View File

@ -1555,12 +1555,16 @@ masterloop(lua_State *L)
}
}
if (!observances_len) {
logstring("Error",
"Internal fail, no observances, no monitor!");
exit(-1);
}
/* the great select */
pr = pselect(
observances[observances_len - 1].fd + 1,
&rfds, &wfds, NULL,
have_alarm ? &tv : NULL, &sigset);
if (pr >= 0) {
/* walks through the observances calling ready/writey */
observance_action = true;