Comment 5 for bug 406397

Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote :

This also happens when you use "expect fork" or "expect daemon" combined with "script", Upstart ends up following the first spawned child whose exit status is reaped by the shell. For example:

  script
      ARGS=$(cat /etc/default/myservice)
      exec /sbin/myservice $ARGS
  end script

Upstart ends up with the pid of "cat", and never receives SIGCHLD for it. So stays in running indefinitely, and when you try and stop it, hangs in "stop/killed"