summaryrefslogtreecommitdiff
path: root/ev.c
diff options
context:
space:
mode:
authorroot <root>2007-11-01 11:43:11 +0000
committerroot <root>2007-11-01 11:43:11 +0000
commit1bd3bb1d1727f4452c96ee728278f37bd717a62a (patch)
treedbf9bd774c6202dcf0d708b2532d8c0ff2d104c0 /ev.c
parented301985e66cac8cb0243d42cc8e71f4d8b32f9a (diff)
*** empty log message ***
Diffstat (limited to 'ev.c')
-rw-r--r--ev.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/ev.c b/ev.c
index b23a70e..937f9bd 100644
--- a/ev.c
+++ b/ev.c
@@ -325,14 +325,14 @@ downheap (WT *timers, int N, int k)
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
@@ -355,7 +355,7 @@ sighandler (int signum)
if (!gotsig)
{
gotsig = 1;
- write (sigpipe [1], &gotsig, 1);
+ write (sigpipe [1], &signum, 1);
}
}
@@ -365,8 +365,8 @@ sigcb (struct ev_io *iow, int revents)
struct ev_signal *w;
int sig;
- gotsig = 0;
read (sigpipe [0], &revents, 1);
+ gotsig = 0;
for (sig = signalmax; sig--; )
if (signals [sig].gotsig)