"properly" kill the spawned process