tsan: fix false positive related to signal handlers
Users expect synchronization between sigaction and arrival
of the signal. See the test for details.