Skip to content

Commit

Permalink
remove unused variable warning
Browse files Browse the repository at this point in the history
  • Loading branch information
evantorrie committed Aug 29, 2014
1 parent b935a40 commit a097de8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/monitor.cc
Expand Up @@ -107,12 +107,15 @@ static void doSleep(int ms) {
res = pselect(sigpipefd_r + 1, &readfds, NULL, NULL, &timeout, &blockset);

// Did we exit due to a "signal" sent via the pipe (likely from another thread)
if (FD_ISSET(sigpipefd_r, &readfds)) {
if (res >= 0 && FD_ISSET(sigpipefd_r, &readfds)) {
char c[100];
while ((read(sigpipefd_r, &c, sizeof(c))) == sizeof(c)) {
/* Flush the pipe! */
}
}
else {
perror("pselect");
}
}

NodeMonitor* NodeMonitor::instance_ = NULL;
Expand Down

0 comments on commit a097de8

Please sign in to comment.