Help with respawn

Daniel L. Miller dmiller at amfes.com
Thu Apr 19 06:16:10 BST 2007


I'm still learning myself - and really have no clue - but what happens 
if you move the respawn line to after the end script?

Daniel

Alan Taylor wrote:
> I'm trying to understand how the respawn keyword works in a job file.  
> See the attached files for details. 
>  
> I create a simple Perl daemon (attached "tmp-simple-pl.txt") that 
> dummy loops.  My Upstart job definition file is the attached 
> "etc-event-d-simple.txt".
>  
> When I execute "initctl emit simpleup" I end up getting 10 instances 
> of "simple.pl" (see attached "ps-ef-grep-simple.txt").  If I take away 
> the "respawn" keyword in the job definition file then I get a single 
> instance of " simple.pl"
>  
> 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?
>  
> Thanks,
> Alan
> ------------------------------------------------------------------------
>
> localhost:/ # cat /etc/event.d/simple
>
> start on simpleup
> stop on simpledown
>
> respawn
>
> script
>     exec /tmp/simple.pl
> end script
>   



More information about the upstart-devel mailing list