X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=man%2Fsd-login.xml;h=3fc0e16f698c7a177da7e2544445ad20cbb15fbf;hp=62ec6ffefd07e3dc6e8bfef5547233b03c6cc479;hb=4cfa2c999dea269ddc646bfeba6c7f1021a73843;hpb=01448ff92d9549785242ffab453bf5bcde348c61 diff --git a/man/sd-login.xml b/man/sd-login.xml index 62ec6ffef..3fc0e16f6 100644 --- a/man/sd-login.xml +++ b/man/sd-login.xml @@ -75,7 +75,36 @@ actively make changes to the seat configuration, terminate login sessions, or switch session on a seat you need to utilize the D-Bus API of - systemd-logind. + systemd-logind, instead. + + 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 + free3 + call after use, including the strings referenced + therein. Similar, individual strings returned need to + be freed, as well. + + As a special exception, instead of an empty + string array NULL may be returned, which should be + treated equivalent to an empty string array. See sd_pid_get_session3,