Fixed a command spawner's problem of the case that child process exits
before spawner monitors it.