summaryrefslogtreecommitdiff
path: root/lib/TaskMan.cc
diff options
context:
space:
mode:
Diffstat (limited to 'lib/TaskMan.cc')
-rw-r--r--lib/TaskMan.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/TaskMan.cc b/lib/TaskMan.cc
index 9053d0b..94e89b1 100644
--- a/lib/TaskMan.cc
+++ b/lib/TaskMan.cc
@@ -212,7 +212,7 @@ void TaskMan::MainLoop() throw (GeneralException) {
}
}
- r = poll(ufsd, nfds, (no_burst) && !(Zombies.size()) ? -1: 1);
+ r = poll(ufsd, nfds, (no_burst) && !(Zombies.size()) ? -1: 0);
#else
FD_ZERO(readfds);
FD_ZERO(writefds);
@@ -232,7 +232,7 @@ void TaskMan::MainLoop() throw (GeneralException) {
r = select(highest + 1, &readfds, &writefds, &exceptfds, NULL);
#endif
- if (r == -1) {
+ if (r < 0) {
if (errno == EINTR) {
// child
} else {
@@ -256,7 +256,6 @@ void TaskMan::MainLoop() throw (GeneralException) {
if (q->revents & POLLHUP) {
cerr << _("Handle ") << q->fd << _(" hung up.\n");
- // What should I do now?
}
fd = q->fd;