Hello, all --

Just implemented libevent in a new program using the cool eventxx C++
wrapper.  Anyway, I decided to track down the event_base_free bug a
little more.  Here's the original bug and patch.

http://monkeymail.org/archives/libevent-users/2006-April/000141.html

Seems that we don't need to go through all that effort of fixing the
symptom, it's just that the internal event between the signal handler
and the dispatcher is never deleted. 

Here's the patch that fixes the problem for me (versus the 1.3b release)


--- signal.c    2007-03-03 23:05:07.000000000 -0500
+++ signal.c.new        2007-05-28 11:10:57.000000000 -0400
@@ -143,6 +143,11 @@
        int evsignal;

        evsignal = EVENT_SIGNAL(ev);
+
+       if (ev_signal_added) {
+               ev_signal_added = 0;
+               event_del(&ev_signal);
+       }

        return (sigaction(EVENT_SIGNAL(ev),(struct sigaction *)SIG_DFL,
NULL));
 }

-Jesse Keller



LEGAL NOTICE:
Unless expressly stated otherwise, this message is confidential and may be 
privileged. It is intended for the addressee(s) only. Access to this e-mail by 
anyone else is unauthorized. If you are not an addressee, any disclosure or 
copying of the contents or any action taken (or not taken) in reliance on it is 
unauthorized and may be unlawful. If you are not an addressee, please inform 
the sender immediately.


_______________________________________________
Libevent-users mailing list
Libevent-users@monkey.org
http://monkey.org/mailman/listinfo/libevent-users

Reply via email to