ddollar/foreman — pull request #422 by elad-maimon (2013-12-30 16:07:58+00:00)
Title: Fix upstart stop

The generated upstart script doesn't always stop correctly the running child (or grandchild) process.
For example, this is how the process tree looks like when the process is running:

[deploy@nko ~]$ ps -ef | grep consumer
root 4377 1 ? su - deploy -c cd /home/deploy/kapara/releases/20131230141943; export PORT=5000; bin/kapara consumer >> /home/deploy/kapara/shared/log/consumer-1.log 2>&1
deploy 4381 4377 ? -bash -c cd /home/deploy/kapara/releases/20131230141943; export PORT=5000; bin/kapara consumer >> /home/deploy/kapara/shared/log/consumer-1.log 2>&1
deploy 4497 4381 ? ruby bin/kapara consumer

And this is how it looks like after the stop command:

[deploy@nko ~]$ ps -ef | grep consumer
deploy 4497 1 ? ruby bin/kapara consumer

This issue was actually fixed in [pull request #137](https://github.com/ddollar/foreman/pull/137), but for some reason I can't see the fix line in the code.