|
Michal Schmidt |
e43452 |
From d54ac9394336db0564b3bca712d43042486dacc1 Mon Sep 17 00:00:00 2001
|
|
Michal Schmidt |
e43452 |
From: Lennart Poettering <lennart@poettering.net>
|
|
Michal Schmidt |
e43452 |
Date: Mon, 19 Dec 2011 17:40:31 +0100
|
|
Michal Schmidt |
f1996e |
Subject: [PATCH] man: extend sd-login(7) in regards to mixing D-Bus and
|
|
Michal Schmidt |
f1996e |
synchronous library calls a bit (cherry picked from commit
|
|
Michal Schmidt |
e43452 |
5079a105e701f17439635e76d8cb3052badbb34c)
|
|
Michal Schmidt |
e43452 |
|
|
Michal Schmidt |
e43452 |
---
|
|
Michal Schmidt |
e43452 |
man/sd-login.xml | 12 +++++++++++-
|
|
Michal Schmidt |
e43452 |
1 files changed, 11 insertions(+), 1 deletions(-)
|
|
Michal Schmidt |
e43452 |
|
|
Michal Schmidt |
e43452 |
diff --git a/man/sd-login.xml b/man/sd-login.xml
|
|
Michal Schmidt |
e43452 |
index 9926d2b..3fc0e16 100644
|
|
Michal Schmidt |
e43452 |
--- a/man/sd-login.xml
|
|
Michal Schmidt |
e43452 |
+++ b/man/sd-login.xml
|
|
Michal Schmidt |
e43452 |
@@ -77,13 +77,23 @@
|
|
Michal Schmidt |
e43452 |
you need to utilize the D-Bus API of
|
|
Michal Schmidt |
e43452 |
systemd-logind, instead.</para>
|
|
Michal Schmidt |
e43452 |
|
|
Michal Schmidt |
e43452 |
- <para>These functions access data in
|
|
Michal Schmidt |
e43452 |
+ <para>These functions synchronously access data in
|
|
Michal Schmidt |
e43452 |
<filename>/proc</filename>,
|
|
Michal Schmidt |
e43452 |
<filename>/sys/fs/cgroup</filename> and
|
|
Michal Schmidt |
e43452 |
<filename>/run</filename>. All of these are virtual
|
|
Michal Schmidt |
e43452 |
file systems, hence the runtime cost of the accesses
|
|
Michal Schmidt |
e43452 |
is relatively cheap.</para>
|
|
Michal Schmidt |
e43452 |
|
|
Michal Schmidt |
e43452 |
+ <para>It is possible (and often a very good choice) to
|
|
Michal Schmidt |
e43452 |
+ mix calls to the synchronous interface of
|
|
Michal Schmidt |
e43452 |
+ <filename>sd-login.h</filename> with the asynchronous
|
|
Michal Schmidt |
e43452 |
+ D-Bus interface of systemd-logind. However, if this is
|
|
Michal Schmidt |
e43452 |
+ done you need to think a bit about possible races
|
|
Michal Schmidt |
e43452 |
+ since the stream of events from D-Bus and from
|
|
Michal Schmidt |
e43452 |
+ <filename>sd-login.h</filename> interfaces such as the
|
|
Michal Schmidt |
e43452 |
+ login monitor are asynchronous and not ordered against
|
|
Michal Schmidt |
e43452 |
+ each other.</para>
|
|
Michal Schmidt |
e43452 |
+
|
|
Michal Schmidt |
e43452 |
<para>If the functions return string arrays, these are
|
|
Michal Schmidt |
e43452 |
generally NULL terminated and need to be freed by the
|
|
Michal Schmidt |
e43452 |
caller with the libc
|
|
Michal Schmidt |
e43452 |
--
|
|
Michal Schmidt |
e43452 |
1.7.7.5
|
|
Michal Schmidt |
e43452 |
|