<p dir="ltr">When you say 'Check the "state" instead '<br>
Did you mean ActiveState ?</p>
<div class="gmail_quote">On Jul 3, 2015 3:39 PM, "Lennart Poettering" <<a href="mailto:lennart@poettering.net">lennart@poettering.net</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Fri, 03.07.15 15:29, Pradeepa Kumar (<a href="mailto:cdpradeepa@gmail.com">cdpradeepa@gmail.com</a>) wrote:<br>
<br>
> I am writing lib which will monitor apps and notify/callback higher level<br>
>  if apps went down.<br>
> How can I achieve this?<br>
> I tried doing this using propertieschanged signal and reading<br>
>  substate<br>
<br>
We reserve the liberty to introduce new substates, and hence you<br>
shouldn't check "Substate" anyway if you want to stay compatible with<br>
future versions of systemd. Check the "State" instead, which is more<br>
abstract and is considered API.<br>
<br>
> property and that msg does not have old value and new value in the msg.<br>
> I noticed that when app go down i get two signals and hence two substates -<br>
> stop and stop-term.<br>
> So it is difficult to call registered callbacks only when substate changes<br>
> from running->stop.<br>
<br>
> Do i need to maintain current state of app in my lib?<br>
<br>
If you want to track these state changes, you'd have to cache the<br>
states client-side.<br>
<br>
> is there any other easier way for this ??<br>
<br>
I fear not, sorry.<br>
<br>
Lennart<br>
<br>
--<br>
Lennart Poettering, Red Hat<br>
</blockquote></div>