in reply to Problem with signal handler

You're nearly there.

You're not setting your child signal handler until after the loop has finished. Set it before the loop (just as soon as you know you're the child) and you'll see the message you're expecting.

Some additional notes:

Edit: I missed the actual question. D'oh. Thanks for answering below.

Of course, if the poster wants to kill both parent and child, it's possible that no signal handling code is necessary at all. a ctrl-C from the shell should send a SIGINT to the process group, giving that behaviour by default.