Signed-off-by: David Goulet <david.goulet@polymtl.ca>
}
if (tmp.cmd_type == STOP) {
DBG("Received STOP command");
}
if (tmp.cmd_type == STOP) {
DBG("Received STOP command");
goto end;
}
/* we received a command to add or update fds */
goto end;
}
/* we received a command to add or update fds */
end:
DBG("thread_receive_fds exiting");
end:
DBG("thread_receive_fds exiting");
+ quit = 1;
+ ret = write(poll_pipe[1], "4", 1);
+ if (ret < 0) {
+ perror("poll pipe write");
+ }
+ /* No FDs and quit, cleanup the thread */
+ if (nb_fd == 0 && quit == 1) {
+ goto end;
+ }
+
/*
* if only the poll_pipe triggered poll to return just return to the
* beginning of the loop to update the array
/*
* if only the poll_pipe triggered poll to return just return to the
* beginning of the loop to update the array