If signal was delivered while the main thread was not in poll(2) and after
check was performed, we could reenter poll and never detect termination. Fix
this with the pipefd trick.
It'd probably be reasonable to _exit() if the write somehow fails?
Abort nice program shutdown on unexpected pipefd write(2) failure.
I wonder whether your fixes are enough to remove #ifdef WARMSTART and have this feature compiled in unconditionally.