best practice proposal: name locking and process exclusion

Colin Walters walters at verbum.org
Thu Apr 7 10:22:54 PDT 2011


On Thu, Apr 7, 2011 at 1:06 PM, Lennart Poettering <mzqohf at 0pointer.de> wrote:
>
> You want to claim it so early that you want to claim it actually before
> the process is even spawned, which you can do by using bus activation.

I'm not parsing this.

> A simple solution that wouldn't even enforce a systemd dependency in
> apps could be an algorithm like the following:
>
> 1. If I am not bus activated send Ping() to my own bus name, thus
>   activating a bus activated version of myself. Exit.
> 2. Otherwise, run mainloop and stuff.

This has two undesirable aspects, namely:

* It forces apps to install a .service file; I was thinking of using
this for GApplication, and I can't retroactively say "oh and yeah, you
need to make a .service file".
* In the case of launching an app like Firefox from a terminal when
it's *not* running, we do the whole loading and running through glibc
init and the dynamic linker, only to send a message and exit, then do
it again.


More information about the dbus mailing list