[systemd-devel] sd_bus_add_match after sd_bus_get_fd
Federico Di Pierro
nierro92 at gmail.com
Sat Apr 29 18:31:01 UTC 2017
Hi!
I'm struggling to understand if this can be done: suppose i start polling
on sd_bus_get_fd() without any match; then, after some event happens, i add
a match on same bus.
Will i receive events on my fd just going on polling?
Ie: will this work?
fd = sd_bus_get_fd();
event_happened = 0;
poll(fd);
if (event_happened) sd_bus_process();
else sd_bus_process(); sd_bus_add_match();
It seems it is not working, but i cannot understand if my idea is
completely wrong or if something else is happening.
I mean, fd is still the same obviously, i am only telling sd_bus that i'm
now interested in certain messages, by hooking a callback; am i mistaken?
Thank you very much for your support,
Federico
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20170429/6a954415/attachment.html>
More information about the systemd-devel
mailing list