mirror of
https://github.com/cuberite/libevent.git
synced 2025-09-11 13:24:43 -04:00
Fix an issue with forking and signal socketpairs in select/poll backends
Nicholas Marriott identifies an issue where a signal socketpair doesn't get recreated if the event backend doesn't set event_reinit.
This commit is contained in:
parent
95b71d0cd6
commit
f0ff7659f3
7
event.c
7
event.c
@ -279,9 +279,14 @@ event_reinit(struct event_base *base)
|
||||
int res = 0;
|
||||
struct event *ev;
|
||||
|
||||
#if 0
|
||||
/* Right now, reinit always takes effect, since even if the
|
||||
backend doesn't require it, the signal socketpair code does.
|
||||
*/
|
||||
/* check if this event mechanism requires reinit */
|
||||
if (!evsel->need_reinit)
|
||||
return (0);
|
||||
#endif
|
||||
|
||||
/* prevent internal delete */
|
||||
if (base->sig.ev_signal_added) {
|
||||
@ -294,7 +299,7 @@ event_reinit(struct event_base *base)
|
||||
EVLIST_ACTIVE);
|
||||
base->sig.ev_signal_added = 0;
|
||||
}
|
||||
|
||||
|
||||
if (base->evsel->dealloc != NULL)
|
||||
base->evsel->dealloc(base, base->evbase);
|
||||
evbase = base->evbase = evsel->init(base);
|
||||
|
Loading…
x
Reference in New Issue
Block a user