Recover old signal mask in main thread, block all signals in spawned threads