Edit

kc3-lang/libevent

Branch :

  • Show log

    Commit

  • Author : Nick Mathewson
    Date : 2010-09-15 01:40:02
    Hash : 95a7d418
    Message : Make default signal backend fully threadsafe 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.