Help with respawn

Michael Biebl mbiebl at gmail.com
Thu Apr 19 06:31:38 BST 2007


2007/4/18, Alan Taylor <alanupstart at gmail.com>:

> I can't figure out why I get 10 instances instead of just the single
> instance.  Does it have something to do with the fact that the "simple job"
> runs until stop since the simple.pl daemon forks off from init?  Can Upstart
> supervise this daemon adequately?

Your process must not fork, otherwise upstart can't monitor it. There
will be support for pid files in the future, but that functionality
still has to be implemented.
The reason, why you get 10 instances is, that after your daemon has
forked, upstart believes it died, so it respawns it. This is tried 10
times, then upstart stops to try to respawn the process (this limit
was added to prevent upstart from killing your machine by spawning too
many processes). You should get an error/warning message about that in
the syslog.

HTH,
Michael

-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?



More information about the upstart-devel mailing list