chiark / gitweb /
sd-login: add a public accessor for the VT number
[elogind.git] / man / sd-login.xml
index 9926d2b85cfd85df91bebb2384d233754fc6c8da..251b35b06fa5365e961f9995cd9a9e9ffb084ee1 100644 (file)
@@ -8,20 +8,20 @@
   Copyright 2010 Lennart Poettering
 
   systemd is free software; you can redistribute it and/or modify it
-  under the terms of the GNU General Public License as published by
-  the Free Software Foundation; either version 2 of the License, or
+  under the terms of the GNU Lesser General Public License as published by
+  the Free Software Foundation; either version 2.1 of the License, or
   (at your option) any later version.
 
   systemd is distributed in the hope that it will be useful, but
   WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-  General Public License for more details.
+  Lesser General Public License for more details.
 
-  You should have received a copy of the GNU General Public License
+  You should have received a copy of the GNU Lesser General Public License
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 -->
 
-<refentry id="sd-login">
+<refentry id="sd-login" conditional='HAVE_PAM'>
 
         <refentryinfo>
                 <title>sd-login</title>
@@ -39,7 +39,7 @@
 
         <refmeta>
                 <refentrytitle>sd-login</refentrytitle>
-                <manvolnum>7</manvolnum>
+                <manvolnum>3</manvolnum>
         </refmeta>
 
         <refnamediv>
                 you need to utilize the D-Bus API of
                 systemd-logind, instead.</para>
 
-                <para>These functions access data in
+                <para>These functions synchronously access data in
                 <filename>/proc</filename>,
                 <filename>/sys/fs/cgroup</filename> and
                 <filename>/run</filename>. All of these are virtual
                 file systems, hence the runtime cost of the accesses
                 is relatively cheap.</para>
 
+                <para>It is possible (and often a very good choice) to
+                mix calls to the synchronous interface of
+                <filename>sd-login.h</filename> 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
+                <filename>sd-login.h</filename> interfaces such as the
+                login monitor are asynchronous and not ordered against
+                each other.</para>
+
                 <para>If the functions return string arrays, these are
-                generally NULL terminated and need to be freed by the
+                generally <constant>NULL</constant> terminated and need to be freed by the
                 caller with the libc
                 <citerefentry><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>
                 call after use, including the strings referenced
                 be freed, as well.</para>
 
                 <para>As a special exception, instead of an empty
-                string array NULL may be returned, which should be
+                string array <constant>NULL</constant> may be returned, which should be
                 treated equivalent to an empty string array.</para>
 
                 <para>See
 
                 <para>These APIs are implemented as shared library,
                 which can be compiled and linked to with the
-                <literal>libsystemd-login</literal>
-                <citerefentry><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+                <constant>libsystemd-login</constant> <citerefentry><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
                 file.</para>
         </refsect1>
 
                         <citerefentry><refentrytitle>sd_seat_get_active</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>sd_get_seats</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>sd_login_monitor_new</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
-                        <citerefentry><refentrytitle>sd-daemon</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
-                        <citerefentry><refentrytitle>sd-readahead</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
+                        <citerefentry><refentrytitle>sd-daemon</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+                        <citerefentry><refentrytitle>sd-readahead</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
                 </para>
         </refsect1>