The problem is in init/job_process.c, function job_process_run().
Upstart detects SHELL_CHARS in the exec line, so first time
it launches command with shell and exec wrappings

/bin/sh -e -c exec /bin/sh -c "exit"

and set "script" flag for the job's MAIN_PROCESS.
During the second "initctl start" and job_process_run
the "script" flags is set so the following line is passed
to job_process_span and execve

/bin/sh -e -c /bin/sh -c "exit"

Because of absent "exec", shell forks, it is caught by
handler, so upstart believes that daemon has been started.

It seems that "proc->script = TRUE;" should not be set.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1181789

Title:
  second call of 'initctl start' leads to fork instead of exec ('mount:
  / is busy' during shutdown)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/upstart/+bug/1181789/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to