in reply to signal handling in exec()'d code

Your code works for me on a recent Linux (even after exec), but it is possible that your platform has broken signal handling, so you may try to use POSIX-conformant signal handling, like in this node. I hope this helps.