handle pre-thread-init and post-exit signals
From derek.br...@gmail.com on February 18, 2009 14:38:22
with NPTL (POSIX) a SYS_kill signal is delivered to a single thread chosen arbitrarily among those that aren't blocking it (each thread has its own signal mask). this means a thread can receive a signal during our thread initialization, before we've set up its dcontext and other structures, in which case we die.
we also have problems when a signal comes in during process exit after we've removed our handler: the app then dies ungracefully. technically that could happen natively too but is much less likely since it exits more quickly. this is less of an issue for release build and is more of an annoyance for itimer testing.
Original issue: http://code.google.com/p/dynamorio/issues/detail?id=26