this is the fix libevent upstream have decided to go with.

poll and select backends weren't reinitialised after fork() so the same
socketpair was used for parent and child, leading to a race as to which
got to read() the byte from it and the loser hanging.

either use libevent 1.4 from git or apply this and rebuild libevent.

anyone care to talk to the FreeBSD/MacPorts guys to get this in there?

cheers


Index: event.c
===================================================================
RCS file: /cvs/src/lib/libevent/event.c,v
retrieving revision 1.24
diff -u -p -r1.24 event.c
--- event.c     12 Jul 2010 18:03:38 -0000      1.24
+++ event.c     26 Aug 2010 19:57:53 -0000
@@ -281,9 +281,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) {
@@ -296,7 +301,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);

------------------------------------------------------------------------------
Sell apps to millions through the Intel(R) Atom(Tm) Developer Program
Be part of this innovative community and reach millions of netbook users 
worldwide. Take advantage of special opportunities to increase revenue and 
speed time-to-market. Join now, and jumpstart your future.
http://p.sf.net/sfu/intel-atom-d2d
_______________________________________________
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users

Reply via email to