[Libevent-users] Sigprocmask vs pthread_sigprocmask
Nick Mathewson
nickm at freehaven.net
Wed Feb 21 03:44:58 EST 2007
Hi, all. There's been a recent exchange on the Tor development list
about the intersection of signals with pthreads with libevent. Both
posts are (I hope) concise, so I'll link to them here:
http://archives.seul.org/or/dev/Feb-2007/msg00028.html
http://archives.seul.org/or/dev/Feb-2007/msg00030.html
In summary: when pthreads are in use, it's wrong to call
sigprocmask(), and right to call its identical cousin,
pthread_sigmask(). This isn't just a cosmetic issue; it can cause
real bugs with signal delivery. Right now, libevent only calls
sigprocmask. It would be good if there were some way to tell
libevent, "I'm going to use pthreads; use pthread_sigmask() instead of
sigprocmask()." I don't know what that interface should be, but the
corresponding code should be pretty simple to write.
yrs,
--
Nick Mathewson
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 652 bytes
Desc: not available
Url : http://monkeymail.org/archives/libevent-users/attachments/20070221/28d684ac/attachment.bin
More information about the Libevent-users
mailing list