in reply to fork and kill process

Check out this node, it might help. Killing a Forked Subprocess