setting child_pid to 0 before killing the process