Re: Check if dbus program is running



On Tue, 2011-07-19 at 17:14 -0400, Kevin Anthony wrote:
> Hello
> What would be the best way, in C, to check if a dbus program was
> running, before i ran a dbus command against it?

Call org.freedesktop.DBus.ListNames on /org/freedesktop/DBus,
then check if the name of the service you want is in the list
that's returned. Check out Yelp for an example:

http://git.gnome.org/browse/yelp/tree/libyelp/yelp-settings.c#n260

--
Shaun




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]