int exit_code;
};
+static int poll_event_mt_destructor(struct poll_event_context *poll_ev)
+{
+ if (poll_ev->signal_fd != -1) {
+ close(poll_ev->signal_fd);
+ poll_ev->signal_fd = -1;
+ }
+ if (poll_ev->num_fds == 0) {
+ return 0;
+ }
+ if (poll_ev->fds[0].fd != -1) {
+ close(poll_ev->fds[0].fd);
+ poll_ev->fds[0].fd = -1;
+ }
+ return 0;
+}
+
/*
create a poll_event_context structure.
*/
return 0;
}
-static int poll_event_mt_destructor(struct poll_event_context *poll_ev)
-{
- if (poll_ev->signal_fd != -1) {
- close(poll_ev->signal_fd);
- poll_ev->signal_fd = -1;
- }
- if (poll_ev->num_fds == 0) {
- return 0;
- }
- if (poll_ev->fds[0].fd != -1) {
- close(poll_ev->fds[0].fd);
- poll_ev->fds[0].fd = -1;
- }
- return 0;
-}
-
static bool set_nonblock(int fd)
{
int val;