]> granicus.if.org Git - libevent/commitdiff
fix signal usage
authorNiels Provos <provos@gmail.com>
Fri, 7 Mar 2003 23:19:05 +0000 (23:19 +0000)
committerNiels Provos <provos@gmail.com>
Fri, 7 Mar 2003 23:19:05 +0000 (23:19 +0000)
svn:r41

select.c

index 00046c731c2cd34b735d7d0dea4dab802cd03b3d..7749f0c7fcf2f2f91aee5cf26cfa483857b508b4 100644 (file)
--- a/select.c
+++ b/select.c
@@ -75,7 +75,7 @@ struct selectop {
 
 void evsignal_init(sigset_t *);
 void evsignal_process(void);
-int evsignal_recalc(void);
+int evsignal_recalc(sigset_t *);
 int evsignal_deliver(void);
 int evsignal_add(sigset_t *, struct event *);
 int evsignal_del(sigset_t *, struct event *);
@@ -154,7 +154,7 @@ select_recalc(void *arg, int max)
                sop->event_fdsz = fdsz;
        }
 
-       return (evsignal_recalc());
+       return (evsignal_recalc(&sop->evsigmask));
 }
 
 int
@@ -180,7 +180,7 @@ select_dispatch(void *arg, struct timeval *tv)
        res = select(sop->event_fds + 1, sop->event_readset, 
            sop->event_writeset, NULL, tv);
 
-       if (evsignal_recalc() == -1)
+       if (evsignal_recalc(&sop->evsigmask) == -1)
                return (-1);
 
        if (res == -1) {
@@ -247,8 +247,6 @@ select_del(void *arg, struct event *ev)
 {
        struct selectop *sop = arg;
 
-       int signal;
-
        if (!(ev->ev_events & EV_SIGNAL))
                return (0);