Hi,

Scott James Remnant:
>       pid = instance.Get("pid")["main"]
> 
>       # Muck around with pid as you see fit
>       if os.path.isfile("/tmp/%d" % pid):
>           return
> 
>       # Oh dear, it's broken
>       instance.Restart()

Nice race condition there. :-P

This example just shows that starting jobs cleanly is not quite as
simple as you'd think (well ... isn't that a surprise ;-) which 
demonstrates that an expressive IPC protocol is a Good Thing,
ultimately.

-- 
Matthias Urlichs   |   {M:U} IT Design @ m-u-it.de   |  [EMAIL PROTECTED]
Disclaimer: The quote was selected randomly. Really. | http://smurf.noris.de
 - -
:locked up: adj. Syn. for {hung}, {wedged}.

-- 
upstart-devel mailing list
upstart-devel@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/upstart-devel

Reply via email to