Disable signal handling in timer thread
authorMilian Wolff <mail@milianw.de>
Fri, 7 Apr 2017 12:07:31 +0000 (14:07 +0200)
committerMilian Wolff <mail@milianw.de>
Fri, 7 Apr 2017 12:24:33 +0000 (14:24 +0200)
commite203d56632b94e6607d6cdc8710f947d644fc764
tree1440e7a4a5ec42c44971ebbebf3ceca030e707b3
parent1bab9e49229c66554998e7193c668b961e62e174
Disable signal handling in timer thread

When the host application sets up a custom signal handler thread
only that thread is supposed to handle the signals. But heaptrack
spawns up the timer thread on initialization, i.e. when it
first encounters a memory allocation. This usually happens before
the host application has setup the signal mask. As such, our timer
thread would still receive e.g. SIGTERM and then shutdown the whole
application.

Now, we disable signal handling in the helper thread to fix this
behavior for applications that rely on it.

BUG: 378494
src/track/libheaptrack.cpp
tests/manual/CMakeLists.txt
tests/manual/signals.cpp [new file with mode: 0644]