in reply to Continuing a program after Forking

The syntax for kill is kill signumber, list of pids.

You might want to try something like

kill 9, keys %pid;

If you do not specify the signal number, I am not sure what signal it sends