Avoid passing invalid data to kill_pid (Fixes #131)