Do not use signals the signal()
function in a multithreaded programsprogram. This is undefined behavior in C11 (Section 7.14.1.1, paragraph 7). Furthermore, in POSIX, sending an uncaught signal in order to kill a thread causes the signal to kill the entire process, not just the individual thread.
...