diff options
author | Reyk Floeter <reyk@cvs.openbsd.org> | 2005-04-13 16:15:10 +0000 |
---|---|---|
committer | Reyk Floeter <reyk@cvs.openbsd.org> | 2005-04-13 16:15:10 +0000 |
commit | 36f62af29d7802c14d4984c28e17020e8241757a (patch) | |
tree | 76187efb93acbbf0932bafb7e876c5af6b9c3f8b /lib/libevent | |
parent | 68942fa96bc83a210c61f411cf9e7ad60b9fb8b8 (diff) |
use "volatile sig_atomic_t" types instead of "int" for signal flags.
ok deraadt@ henning@ provos
Diffstat (limited to 'lib/libevent')
-rw-r--r-- | lib/libevent/event.3 | 4 | ||||
-rw-r--r-- | lib/libevent/event.c | 9 |
2 files changed, 7 insertions, 6 deletions
diff --git a/lib/libevent/event.3 b/lib/libevent/event.3 index ec5614a1844..1395f8ec009 100644 --- a/lib/libevent/event.3 +++ b/lib/libevent/event.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: event.3,v 1.13 2005/02/02 09:59:17 jolan Exp $ +.\" $OpenBSD: event.3,v 1.14 2005/04/13 16:15:09 reyk Exp $ .\" .\" Copyright (c) 2000 Artur Grabowski <art@openbsd.org> .\" All rights reserved. @@ -144,7 +144,7 @@ .Fn "evbuffer_find" "struct evbuffer *buf" "u_char *data" "size_t size" .Ft int .Fa (*event_sigcb)(void) ; -.Ft int +.Ft volatile sig_atomic_t .Fa event_gotsig ; .Sh DESCRIPTION The diff --git a/lib/libevent/event.c b/lib/libevent/event.c index ce774f4ead3..327c565f58c 100644 --- a/lib/libevent/event.c +++ b/lib/libevent/event.c @@ -1,4 +1,4 @@ -/* $OpenBSD: event.c,v 1.5 2004/04/28 06:53:12 brad Exp $ */ +/* $OpenBSD: event.c,v 1.6 2005/04/13 16:15:09 reyk Exp $ */ /* * Copyright (c) 2000-2004 Niels Provos <provos@citi.umich.edu> @@ -50,6 +50,7 @@ #include <unistd.h> #endif #include <errno.h> +#include <signal.h> #include <string.h> #include <err.h> #include <assert.h> @@ -109,9 +110,9 @@ const struct eventop *evsel; void *evbase; /* Handle signals - This is a deprecated interface */ -int (*event_sigcb)(void); /* Signal callback when gotsig is set */ -int event_gotsig; /* Set in signal handler */ -int event_gotterm; /* Set to terminate loop */ +int (*event_sigcb)(void); /* Signal callback when gotsig is set */ +volatile sig_atomic_t event_gotsig; /* Set in signal handler */ +volatile sig_atomic_t event_gotterm; /* Set to terminate loop */ /* Prototypes */ void event_queue_insert(struct event *, int); |