]> granicus.if.org Git - libevent/commitdiff
Fix an issue with forking and signal socketpairs in select/poll backends
authorNick Mathewson <nickm@torproject.org>
Thu, 26 Aug 2010 19:09:58 +0000 (15:09 -0400)
committerNick Mathewson <nickm@torproject.org>
Thu, 26 Aug 2010 19:11:35 +0000 (15:11 -0400)
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

event.c

diff --git a/event.c b/event.c
index e18b3b97011bdedcb7756897fe79e6732add26b8..dbf1c2f340b34e3f1e77b7ad4e30a7ca798cab47 100644 (file)
--- a/event.c
+++ b/event.c
@@ -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) {