static int poll_fd = -1;
bool uloop_cancelled = false;
+bool uloop_handle_sigchld = true;
static int uloop_status = 0;
static bool do_sigchld = false;
return __uloop_fd_delete(fd);
}
-static int tv_diff(struct timeval *t1, struct timeval *t2)
+static int64_t tv_diff(struct timeval *t1, struct timeval *t2)
{
return
(t1->tv_sec - t2->tv_sec) * 1000 +
return 0;
}
-int uloop_timeout_remaining(struct uloop_timeout *timeout)
+int64_t uloop_timeout_remaining(struct uloop_timeout *timeout)
{
struct timeval now;
uloop_install_handler(SIGINT, uloop_handle_sigint, &old_sigint, add);
uloop_install_handler(SIGTERM, uloop_handle_sigint, &old_sigterm, add);
- uloop_install_handler(SIGCHLD, uloop_sigchld, &old_sigchld, add);
+
+ if (uloop_handle_sigchld)
+ uloop_install_handler(SIGCHLD, uloop_sigchld, &old_sigchld, add);
uloop_ignore_signal(SIGPIPE, add);
}
static int uloop_get_next_timeout(struct timeval *tv)
{
struct uloop_timeout *timeout;
- int diff;
+ int64_t diff;
if (list_empty(&timeouts))
return -1;