2 .\" Title: sd_get_seats
3 .\" Author: Lennart Poettering <lennart@poettering.net>
4 .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
6 .\" Manual: sd_get_seats
10 .TH "SD_GET_SEATS" "3" "02/15/2012" "systemd" "sd_get_seats"
11 .\" -----------------------------------------------------------------
12 .\" * Define some portability stuff
13 .\" -----------------------------------------------------------------
14 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15 .\" http://bugs.debian.org/507673
16 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
20 .\" -----------------------------------------------------------------
21 .\" * set default formatting
22 .\" -----------------------------------------------------------------
23 .\" disable hyphenation
25 .\" disable justification (adjust text to left margin only)
27 .\" -----------------------------------------------------------------
28 .\" * MAIN CONTENT STARTS HERE *
29 .\" -----------------------------------------------------------------
31 sd_get_seats, sd_get_sessions, sd_get_uids \- Determine available seats, sessions and logged in users
36 #include <systemd/sd\-login\&.h>
39 .HP \w'int\ sd_get_seats('u
40 .BI "int sd_get_seats(char***\ " "seats" ");"
41 .HP \w'int\ sd_get_sessions('u
42 .BI "int sd_get_sessions(char***\ " "sessions" ");"
43 .HP \w'int\ sd_get_uids('u
44 .BI "int sd_get_uids(char***\ " "sessions" ");"
48 may be used to determine all currently available local seats\&. Returns a NULL terminated array of seat identifiers\&. The returned array and all strings it references need to be freed with the libc
50 call after use\&. Note that instead of an empty array NULL may be returned and should be considered equivalent to an empty array\&.
53 \fBsd_get_sessions()\fR
54 may be used to determine all current login sessions\&.
58 may be used to determine all Unix users who currently have login sessions\&.
63 \fBsd_get_sessions()\fR
66 return the number of entries in the arrays\&. On failure, these calls return a negative errno\-style error code\&.
71 \fBsd_get_sessions()\fR
74 interfaces are available as shared library, which can be compiled and linked to with the
83 \fBsd_session_get_seat\fR(3)
86 \fBLennart Poettering\fR <\&lennart@poettering\&.net\&>