summaryrefslogtreecommitdiff
path: root/evsignal-internal.h
Commit message (Collapse)AuthorAgeFilesLines
* Remove the now-useless evsig_caught and evsig_processNick Mathewson2010-09-151-3/+0
|
* Make default signal backend fully threadsafeNick Mathewson2010-09-151-1/+0
| | | | | | | | | | | | | | | Jason Toffaletti discovered with helgrind that our signal handler was messing with evsig_base, which can be set from lots of places in the code. Ordinarly, we'd just stick a lock on it, except that it is illegal (and genuinely error-prone) to call pthread_mutex_acquire() from inside a signal handler. The solution is to only store the fd we write to in a static variable, write the signal number to the fd, and put evsig_cb in charge of activating signal events. I have no idea how we'll cope if we want to enable this to handle siginfo (where available) in the future.
* Warn when using the error-prone EV_SIGNAL interface in an error-prone way. ↵Nick Mathewson2010-09-151-0/+14
| | | | | | | | | | | | | | | Also, fix a couple of race conditions in signal.c When using the signal.c signal backend, Libevent currently only allows one event_base to actually receive signals at a time. (This has been the behavior since at least 1.4 and probably much earlier.) Now, we detect and warn if you're likely to be racing about which signal goes to which thread. We also add a lock to control modifications of the evsig_base field, to avoid race conditions like those found by Jason Toffaletti. Also, more comments. Comments are good.
* Update all our copyright notices to say "2010"Nick Mathewson2010-03-041-1/+1
|
* Try to contain the failure when we are running without socketpair().Nick Mathewson2009-05-221-1/+1
| | | | | | | | | | | | | Some win32 systems (mostly those using Kaspersky, it would seem) prevent us from faking socketpair(). This makes our signal notification code just not work. Our response since 1.4 has been to assert. For users who would rather work without signals than not work at all, this has been a regression from 1.3e. This patch makes adding signal events fail in this case; there's no reason to kill the whole process. svn:r1303
* Add a trival start of a be_async test.Nick Mathewson2009-05-051-1/+2
| | | | svn:r1276
* Update copyright statements to reflect the facts that:Nick Mathewson2009-01-271-2/+2
| | | | | | | | | a) this is 2009 b) niels and nick have been comaintainers for a while c) saying "all rights reserved" when you then go on to explicitly disclaim some rights is sheer cargo-cultism. svn:r1065
* Replace all use of config.h with event-config.h.Nick Mathewson2009-01-271-1/+1
| | | | svn:r1064
* Rename four internal headers to follow the -internal.h convention.Nick Mathewson2009-01-131-0/+53
svn:r1000