summaryrefslogtreecommitdiff
path: root/poll.c
diff options
context:
space:
mode:
authorNiels Provos <provos@gmail.com>2007-02-28 04:29:18 +0000
committerNiels Provos <provos@gmail.com>2007-02-28 04:29:18 +0000
commit8d94bd03ebac666171fbbc75a598ef01f63390f5 (patch)
treed99325c870751dd2560e43bac7f11498634119ee /poll.c
parent127c260bb7f8e972fffab9bc72bd1f53eae48730 (diff)
downloadlibevent-8d94bd03ebac666171fbbc75a598ef01f63390f5.tar.gz
signal fixes from scott lamb
svn:r340
Diffstat (limited to 'poll.c')
-rw-r--r--poll.c17
1 files changed, 4 insertions, 13 deletions
diff --git a/poll.c b/poll.c
index f0d9a1e2..b51c3d46 100644
--- a/poll.c
+++ b/poll.c
@@ -66,7 +66,6 @@ struct pollop {
int *idxplus1_by_fd; /* Index into event_set by fd; we add 1 so
* that 0 (which is easy to memset) can mean
* "no entry." */
- sigset_t evsigmask;
};
void *poll_init (void);
@@ -98,7 +97,7 @@ poll_init(void)
if (!(pollop = calloc(1, sizeof(struct pollop))))
return (NULL);
- evsignal_init(&pollop->evsigmask);
+ evsignal_init();
return (pollop);
}
@@ -111,9 +110,7 @@ poll_init(void)
int
poll_recalc(struct event_base *base, void *arg, int max)
{
- struct pollop *pop = arg;
-
- return (evsignal_recalc(&pop->evsigmask));
+ return (0);
}
#ifdef CHECK_INVARIANTS
@@ -156,17 +153,11 @@ poll_dispatch(struct event_base *base, void *arg, struct timeval *tv)
int res, i, sec, nfds;
struct pollop *pop = arg;
- if (evsignal_deliver(&pop->evsigmask) == -1)
- return (-1);
-
poll_check_ok(pop);
sec = tv->tv_sec * 1000 + (tv->tv_usec + 999) / 1000;
nfds = pop->nfds;
res = poll(pop->event_set, nfds, sec);
- if (evsignal_recalc(&pop->evsigmask) == -1)
- return (-1);
-
if (res == -1) {
if (errno != EINTR) {
event_warn("poll");
@@ -228,7 +219,7 @@ poll_add(void *arg, struct event *ev)
int i;
if (ev->ev_events & EV_SIGNAL)
- return (evsignal_add(&pop->evsigmask, ev));
+ return (evsignal_add(ev));
if (!(ev->ev_events & (EV_READ|EV_WRITE)))
return (0);
@@ -333,7 +324,7 @@ poll_del(void *arg, struct event *ev)
int i;
if (ev->ev_events & EV_SIGNAL)
- return (evsignal_del(&pop->evsigmask, ev));
+ return (evsignal_del(ev));
if (!(ev->ev_events & (EV_READ|EV_WRITE)))
return (0);