mirror of
https://github.com/cuberite/libevent.git
synced 2025-09-14 06:49:35 -04:00
fix signal usage
svn:r41
This commit is contained in:
parent
e72dff13d9
commit
01a932fe1f
8
select.c
8
select.c
@ -75,7 +75,7 @@ struct selectop {
|
|||||||
|
|
||||||
void evsignal_init(sigset_t *);
|
void evsignal_init(sigset_t *);
|
||||||
void evsignal_process(void);
|
void evsignal_process(void);
|
||||||
int evsignal_recalc(void);
|
int evsignal_recalc(sigset_t *);
|
||||||
int evsignal_deliver(void);
|
int evsignal_deliver(void);
|
||||||
int evsignal_add(sigset_t *, struct event *);
|
int evsignal_add(sigset_t *, struct event *);
|
||||||
int evsignal_del(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;
|
sop->event_fdsz = fdsz;
|
||||||
}
|
}
|
||||||
|
|
||||||
return (evsignal_recalc());
|
return (evsignal_recalc(&sop->evsigmask));
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
@ -180,7 +180,7 @@ select_dispatch(void *arg, struct timeval *tv)
|
|||||||
res = select(sop->event_fds + 1, sop->event_readset,
|
res = select(sop->event_fds + 1, sop->event_readset,
|
||||||
sop->event_writeset, NULL, tv);
|
sop->event_writeset, NULL, tv);
|
||||||
|
|
||||||
if (evsignal_recalc() == -1)
|
if (evsignal_recalc(&sop->evsigmask) == -1)
|
||||||
return (-1);
|
return (-1);
|
||||||
|
|
||||||
if (res == -1) {
|
if (res == -1) {
|
||||||
@ -247,8 +247,6 @@ select_del(void *arg, struct event *ev)
|
|||||||
{
|
{
|
||||||
struct selectop *sop = arg;
|
struct selectop *sop = arg;
|
||||||
|
|
||||||
int signal;
|
|
||||||
|
|
||||||
if (!(ev->ev_events & EV_SIGNAL))
|
if (!(ev->ev_events & EV_SIGNAL))
|
||||||
return (0);
|
return (0);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user