/* Adding the quit pipe */
kernel_pollfd[nb_fd - 1].fd = thread_quit_pipe[0];
+ kernel_pollfd[nb_fd - 1].events =
+ POLLHUP | POLLNVAL | POLLERR | POLLIN | POLLRDHUP | POLLPRI;
return nb_fd;
goto error;
} else if (ret == 0) {
/* Should not happen since timeout is infinite */
+ ERR("Return value of poll is 0 with an infinite timeout.\n"
+ "This should not have happened! Continuing...");
continue;
}
/* First fd is always the quit pipe */
(*pollfd)[0].fd = thread_quit_pipe[0];
+ (*pollfd)[0].events =
+ POLLHUP | POLLNVAL | POLLERR | POLLIN | POLLRDHUP | POLLPRI;
+
/* Apps command pipe */
(*pollfd)[1].fd = apps_cmd_pipe[0];
(*pollfd)[1].events = POLLIN;
* best which are the thread_quit_pipe and apps_cmd_pipe.
*/
nb_fd = 2;
+ MSG("nb_fd < 2 --> Not good! Continuing...");
}
/* Destroy old pollfd */
/* First fd is always the quit pipe */
pollfd[0].fd = thread_quit_pipe[0];
+ pollfd[0].events =
+ POLLHUP | POLLNVAL | POLLERR | POLLIN | POLLRDHUP | POLLPRI;
/* Apps socket */
pollfd[1].fd = apps_sock;
/* First fd is always the quit pipe */
pollfd[0].fd = thread_quit_pipe[0];
+ pollfd[0].events =
+ POLLHUP | POLLNVAL | POLLERR | POLLIN | POLLRDHUP | POLLPRI;
/* Apps socket */
pollfd[1].fd = client_sock;