Thanks Lennart. Is there a way I can do it from shell rather than writing C or 
Java code? I just want to quickly verify that the messages I get once Unit 
state changes. Any example? 

Thanks.



On Wednesday, March 5, 2014 2:22 PM, Lennart Poettering 
<lenn...@poettering.net> wrote:
 
On Wed, 05.03.14 08:42, Usman (deser...@yahoo.com) wrote:


> Hi Guys,
> 
> Probably this question has been asked before and it might be a DBus
> list question rather than systemd but just asking anyway, so please
> pardon my ignorance. I am using "dbus-send" to get some properties out
> of systemd dbus messages when an application dies. The thing is that I
> need to send Subscribe first to systemd so that I can receive those
> messages. But if I use dbus-send from commandline it immediately exits
> and then there is no where to receive the death notification messages
> (since there are no active subscriptions). How are you guys testing
> this? Write any script that stays? Any example I can follow? 

Subscribe() is for receiving signals about property changes and
new/removed jobs/units. It is not necessary to call this if you just
want to invoke a method call and want the response for that.

"dbus-send" cannot listen for signals, it only does method invocations,
hence Subscribe() does not apply to it at all...

Lennart

-- 
Lennart Poettering, Red Hat
_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to