Clarification on upstart-0.5 and dbus usage

Matthias Urlichs smurf at smurf.noris.de
Thu Jun 19 00:24:38 BST 2008


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   |  smurf at smurf.noris.de
Disclaimer: The quote was selected randomly. Really. | http://smurf.noris.de
 - -
:locked up: adj. Syn. for {hung}, {wedged}.



More information about the upstart-devel mailing list