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.

See bug 3048812

There may be a similar issue with respect to th_notify_fd
This commit is contained in:
Nick Mathewson 2010-08-26 15:09:58 -04:00
parent 041989fb66
commit d61b2f3386

View File

@ -747,9 +747,16 @@ event_reinit(struct event_base *base)
evsel = base->evsel;
#if 0
/* Right now, reinit always takes effect, since even if the
backend doesn't require it, the signal socketpair code does.
XXX
*/
/* check if this event mechanism requires reinit */
if (!evsel->need_reinit)
goto done;
#endif
/* prevent internal delete */
if (base->sig.ev_signal_added) {