sd-varlink: how to loop over connections?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I'm currently playing with sd-varlink and trying to replace dbus in
one of our daemon with sd-varlink. Not that trivial without
documentation...

My currently biggest question I couldn't solve is: how should a daemon
listen to connections?

There is "sd_varlink_server_loop_auto()", but this exits after the
last connection is closed. This is nice if you start the daemon via
systemd socket activation or something similar and the daemon should
quit afterwards, but I need an always running daemon.
And you cannot call that in a loop ("Failed to run Varlink event loop:
Device or resource busy").
Is the expectation to setup an own event loop without "exit_on_idle"?
Wouldn't it be better if sd_varlink_server_loop_auto() get's an
argument, if it should exit on idle or not? Or do I miss something?

Thanks,
Thorsten

-- 
Thorsten Kukuk, Distinguished Engineer, Senior Architect, Future Technologies
SUSE Software Solutions Germany GmbH, Frankenstraße 146, 90461
Nuernberg, Germany
Managing Director: Ivo Totev, Andrew McDonald, Werner Knoblich (HRB
36809, AG Nürnberg)




[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux