[systemd-devel] Callback of sd_bus_track: when it will be invoked

Lennart Poettering mztabzr at 0pointer.de
Mon Feb 2 03:50:41 PST 2015


On Fri, 30.01.15 15:18, cee1 (fykcee1 at gmail.com) wrote:

> Hi all,
> 
> I notice in sd_bus_track_new, a callback can be specified, but when it
> will be invoked?
> 
> It seems it will not be triggered when a name in track is removed.

But that's what it is supposed to be used for. You need to run an
event loop for this, and attach the bus object to it
though. i.e. either run an sd_event event loop and use
sd_bus_attach_event(), or use some other event loop and integrate
sd-bus into it.

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list