Need help with upstart/init conf selecting wrong PID.
eapache at gmail.com
Tue Mar 22 12:05:50 UTC 2011
I'm not 100% sure of this, but I think it's because you have 'exec su'
and 'screen', both of which do process manipulation (exec, fork, etc.)
which is confusing it. I don't think it can handle two layers of
It's worth trying to change your screen arguments to "-D -m -S etc"
because according to man screen, the capital D argument is the same as
the lower-case d argument except that it stops screen from forking.
If this doesn't work, then I'm really not sure what the problem is,
sorry. Maybe somebody else on the list will know.
On Tue, Mar 22, 2011 at 6:24 AM, Mathijs <mathijs at smoeltje.nl> wrote:
> Hello there,
> I don't know where to go with this question, so i hope i can try it here.
> I have created an upstart config to start an application via screen.
> This way that application can be entered via screen when needed.
> The application starts correctly via the init conf, but it doesn't have the
> correct PID.
> I tried expect daemon, fork, and non, but this doesn't work.
> With daemon and fork it starts, but not the correct PID, and status myapp,
> thinks it is still running.
> With no expect, it also starts, but then i thinks it isn't running anymore.
> What can i do to fix/track this problem?
> Here is the conf:
> description "MyApp - startup script"
> start on runlevel 
> stop on runlevel 
> expect daemon
> #expect fork
> console output
> cd /apps/inbox
> exec su myapps -c "screen -d -m -S MYAPP java -jar MyApp.jar"
> end script
> upstart-devel mailing list
> upstart-devel at lists.ubuntu.com
> Modify settings or unsubscribe at:
More information about the upstart-devel