[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gtk
Subject:    Re: Check if dbus program is running
From:       Shaun McCance <shaunm () gnome ! org>
Date:       2011-07-25 1:24:11
Message-ID: 1311557051.2158.284.camel () recto
[Download RAW message or body]

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


_______________________________________________
gtk-list mailing list
gtk-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-list
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic