[systemd-devel] from dbus , how do i find if app went down
Pradeepa Kumar
cdpradeepa at gmail.com
Fri Jul 3 04:16:17 PDT 2015
When you say 'Check the "state" instead '
Did you mean ActiveState ?
On Jul 3, 2015 3:39 PM, "Lennart Poettering" <lennart at poettering.net> wrote:
> On Fri, 03.07.15 15:29, Pradeepa Kumar (cdpradeepa at gmail.com) wrote:
>
> > I am writing lib which will monitor apps and notify/callback higher level
> > if apps went down.
> > How can I achieve this?
> > I tried doing this using propertieschanged signal and reading
> > substate
>
> We reserve the liberty to introduce new substates, and hence you
> shouldn't check "Substate" anyway if you want to stay compatible with
> future versions of systemd. Check the "State" instead, which is more
> abstract and is considered API.
>
> > property and that msg does not have old value and new value in the msg.
> > I noticed that when app go down i get two signals and hence two
> substates -
> > stop and stop-term.
> > So it is difficult to call registered callbacks only when substate
> changes
> > from running->stop.
>
> > Do i need to maintain current state of app in my lib?
>
> If you want to track these state changes, you'd have to cache the
> states client-side.
>
> > is there any other easier way for this ??
>
> I fear not, sorry.
>
> Lennart
>
> --
> Lennart Poettering, Red Hat
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20150703/0ab05d85/attachment-0001.html>
More information about the systemd-devel
mailing list