/*
+ * libev event processing core, watcher management
+ *
* Copyright (c) 2007 Marc Alexander Lehmann <libev@schmorp.de>
* All rights reserved.
*
typedef struct
{
struct ev_signal *head;
- sig_atomic_t gotsig;
+ sig_atomic_t volatile gotsig;
} ANSIG;
static ANSIG *signals;
static int signalmax;
static int sigpipe [2];
-static sig_atomic_t gotsig;
+static sig_atomic_t volatile gotsig;
static struct ev_io sigev;
static void
if (!gotsig)
{
gotsig = 1;
- write (sigpipe [1], &gotsig, 1);
+ write (sigpipe [1], &signum, 1);
}
}
struct ev_signal *w;
int sig;
- gotsig = 0;
read (sigpipe [0], &revents, 1);
+ gotsig = 0;
for (sig = signalmax; sig--; )
if (signals [sig].gotsig)
/*****************************************************************************/
void
-ev_prefork (void)
+ev_fork_prepare (void)
{
/* nop */
}
void
-ev_postfork_parent (void)
+ev_fork_parent (void)
{
/* nop */
}
void
-ev_postfork_child (void)
+ev_fork_child (void)
{
#if EV_USE_EPOLL
if (ev_method == EVMETHOD_EPOLL)