65 static void uv__signal_global_init(
void) {
122 }
while (
r < 0 && errno ==
EINTR);
124 return (
r < 0) ? -1 : 0;
134 }
while (
r < 0 && errno ==
EINTR);
136 return (
r < 0) ? -1 : 0;
143 if (sigfillset(&new_mask))
147 sigemptyset(saved_sigmask);
148 if (pthread_sigmask(SIG_SETMASK, &new_mask, saved_sigmask))
160 if (pthread_sigmask(SIG_SETMASK, saved_sigmask,
NULL))
210 }
while (
r == -1 && errno ==
EINTR);
213 (
r == -1 && (errno ==
EAGAIN || errno == EWOULDBLOCK)));
229 memset(&sa, 0,
sizeof(sa));
230 if (sigfillset(&sa.sa_mask))
235 sa.sa_flags |= SA_RESETHAND;
249 memset(&sa, 0,
sizeof(sa));
250 sa.sa_handler = SIG_DFL;
265 if (
loop->signal_pipefd[0] != -1)
274 loop->signal_pipefd[0]);
285 loop->signal_pipefd[0] = -1;
286 loop->signal_pipefd[1] = -1;
303 if (
handle->type == UV_SIGNAL)
307 if (
loop->signal_pipefd[0] != -1) {
309 loop->signal_pipefd[0] = -1;
312 if (
loop->signal_pipefd[1] != -1) {
314 loop->signal_pipefd[1] = -1;
328 handle->caught_signals = 0;
329 handle->dispatched_signals = 0;
375 handle->signal_cb = signal_cb;
380 if (
handle->signum != 0) {
391 if (first_handle ==
NULL ||
409 handle->signal_cb = signal_cb;
418 unsigned int events) {
431 if (
r == -1 && errno ==
EINTR)
434 if (
r == -1 && (errno ==
EAGAIN || errno == EWOULDBLOCK)) {
464 handle->dispatched_signals++;
479 }
while (
end ==
sizeof buf);
489 if (
w1->signum <
w2->signum)
return -1;
490 if (
w1->signum >
w2->signum)
return 1;
497 if (
f1 <
f2)
return -1;
498 if (
f1 >
f2)
return 1;
503 if (
w1->loop <
w2->loop)
return -1;
504 if (
w1->loop >
w2->loop)
return 1;
506 if (
w1 <
w2)
return -1;
507 if (
w1 >
w2)
return 1;
536 (void) removed_handle;
542 if (first_handle ==
NULL) {
547 if (first_oneshot && !rem_oneshot) {
static mcore_handle handle
static RzBinXtrData * oneshot(RzBin *bin, const ut8 *buf, ut64 size, int subbin_type)
return memset(p, 0, total)
#define RB_NEXT(name, x, y)
#define RB_INSERT(name, x, y)
#define RB_NFIND(name, x, y)
#define RB_REMOVE(name, x, y)
#define RB_INITIALIZER(root)
static static fork const void static count static fd const char static mode const char static pathname const char static path const char static dev const char static group static getpid static getuid void void static data static pause const char static mode static sync const char const char static newpath const char static pathname unsigned long static filedes void static end_data_segment signum
assert(limit<=UINT32_MAX/2)
#define QUEUE_FOREACH(q, h)
#define QUEUE_DATA(ptr, type, field)
static struct sockaddr static addrlen static backlog const void msg
void uv__io_stop(uv_loop_t *loop, uv__io_t *w, unsigned int events)
void uv__io_start(uv_loop_t *loop, uv__io_t *w, unsigned int events)
void uv__io_init(uv__io_t *w, uv__io_cb cb, int fd)
int uv__make_pipe(int fds[2], int flags)
static int uv__signal_loop_once_init(uv_loop_t *loop)
int uv_signal_init(uv_loop_t *loop, uv_signal_t *handle)
void uv__signal_loop_cleanup(uv_loop_t *loop)
static int uv__signal_register_handler(int signum, int oneshot)
RB_GENERATE_STATIC(uv__signal_tree_s, uv_signal_s, tree_entry, uv__signal_compare)
int uv__signal_loop_fork(uv_loop_t *loop)
static void uv__signal_handler(int signum)
static void uv__signal_stop(uv_signal_t *handle)
static struct uv__signal_tree_s uv__signal_tree
static int uv__signal_start(uv_signal_t *handle, uv_signal_cb signal_cb, int signum, int oneshot)
void uv__signal_global_once_init(void)
static void uv__signal_event(uv_loop_t *loop, uv__io_t *w, unsigned int events)
static int uv__signal_compare(uv_signal_t *w1, uv_signal_t *w2)
void uv__signal_close(uv_signal_t *handle)
void uv__signal_cleanup(void)
int uv_signal_start_oneshot(uv_signal_t *handle, uv_signal_cb signal_cb, int signum)
static void uv__signal_block_and_lock(sigset_t *saved_sigmask)
static int uv__signal_unlock(void)
static uv_signal_t * uv__signal_first_handle(int signum)
RB_HEAD(uv__signal_tree_s, uv_signal_s)
static void uv__signal_unlock_and_unblock(sigset_t *saved_sigmask)
static void uv__signal_global_reinit(void)
static int uv__signal_lock_pipefd[2]
int uv_signal_start(uv_signal_t *handle, uv_signal_cb signal_cb, int signum)
static int uv__signal_lock(void)
static void uv__signal_unregister_handler(int signum)
int uv_signal_stop(uv_signal_t *handle)
static uv_once_t uv__signal_global_init_guard
#define uv__is_closing(h)
#define uv__handle_init(loop_, h, type_)
#define uv__handle_stop(h)
#define uv__handle_start(h)
UV_EXTERN void uv_once(uv_once_t *guard, void(*callback)(void))
void(* uv_signal_cb)(uv_signal_t *handle, int signum)
int read(izstream &zs, T *x, Items items)