From: Lennart Poettering Date: Mon, 19 Dec 2011 16:40:31 +0000 (+0100) Subject: man: extend sd-login(7) in regards to mixing D-Bus and synchronous library calls... X-Git-Tag: v38~144^2~29 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5079a105e701f17439635e76d8cb3052badbb34c;p=systemd man: extend sd-login(7) in regards to mixing D-Bus and synchronous library calls a bit --- diff --git a/man/sd-login.xml b/man/sd-login.xml index 9926d2b8..3fc0e16f 100644 --- a/man/sd-login.xml +++ b/man/sd-login.xml @@ -77,13 +77,23 @@ you need to utilize the D-Bus API of systemd-logind, instead. - These functions access data in + These functions synchronously access data in /proc, /sys/fs/cgroup and /run. All of these are virtual file systems, hence the runtime cost of the accesses is relatively cheap. + It is possible (and often a very good choice) to + mix calls to the synchronous interface of + sd-login.h with the asynchronous + D-Bus interface of systemd-logind. However, if this is + done you need to think a bit about possible races + since the stream of events from D-Bus and from + sd-login.h interfaces such as the + login monitor are asynchronous and not ordered against + each other. + If the functions return string arrays, these are generally NULL terminated and need to be freed by the caller with the libc