Replacing evil looping code

uwesmail2005-lkml at uwesmail2005-lkml at
Fri Nov 10 09:45:42 PST 2006

--- Bastien Nocera <hadess at> schrieb:

> On Fri, 2006-11-10 at 18:23 +0100, uwesmail2005-lkml at wrote:
> > --- Bastien Nocera <hadess at> schrieb:
> <snip>
> > > Any ideas welcome.
> > Here is my idea: use the totem-name(w/o pid) to receive a call to a
> > execute method (that is to get the args). Then in that method
> > give up that name and assume the one with pid. On return you give
> > back the pid so the caller can change its idea of the service name.
> > in short: On startup connect to the bus w/o PID then change the
> name.
> No good, it's racy.
It's not. As long as the service starts up any calls to the method are
blocked, when it is started (got the name) the first message is
By handling that message the name is given up, so no more messages are
handled. The messages that are not yet delivered (flagged with the
unique name/connection to ensure delivery) to the app will start up
another instance. The messages that are already delivered (because of
buffering) could be re-called by the misdeliveree.
> -- 
> Bastien Nocera <hadess at>

Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail:

More information about the dbus mailing list