-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

Massimo Cetra wrote:
> Steven Grimm wrote:
>> It looks like this would be a pretty easy problem to fix -- just make
>> evsignal_init() check to see if the socketpair has already been
>> allocated, and return without doing anything if so.
> yes. i have already sent a patch.. but the mail doesn't seems to have
> been accepted even if it was relayed and i had no response back. Maybe
> attachments are moderated.
> 

Yes this is a problem. Also signal handling suffers from
thread-unsafety. As well as event_loop_exit which is thread-unsafe and
event_init() itself which is thread unsafe. Anyway, I have also sent a
patch to Niels (last week), which solves your problem and all other
problems. It also includes regression tests. He did note that he
received the message.

My solution opens the two file descriptors for every event_base, but
also closes them on event_base_free. So that every event_base is capable
of handling signals. So, my solution also solves your problem, I think.

If only one thread handles signals, this will work. But also it is
possible to have multiple event_bases in one thread and switch around
which one you use, that one will handle signals for you :-)

Best regards,
   Wouter
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iD8DBQFF78l/kDLqNwOhpPgRAjQcAKCDbZ0H149htnxqzXMUNk+iZyUNQwCgtqK5
WCGUgv3Sg3rzTchGQQAMUNE=
=O2Fd
-----END PGP SIGNATURE-----
_______________________________________________
Libevent-users mailing list
[email protected]
http://monkey.org/mailman/listinfo/libevent-users

Reply via email to