'\" t .\" Title: sd_get_seats .\" Author: Lennart Poettering .\" Generator: DocBook XSL Stylesheets v1.76.1 .\" Date: 10/07/2013 .\" Manual: sd_get_seats .\" Source: systemd .\" Language: English .\" .TH "SD_GET_SEATS" "3" "10/07/2013" "systemd" "sd_get_seats" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" sd_get_seats, sd_get_sessions, sd_get_uids \- Determine available seats, sessions and logged in users .SH "SYNOPSIS" .sp .ft B .nf #include .fi .ft .HP \w'int\ sd_get_seats('u .BI "int sd_get_seats(char***\ " "seats" ");" .HP \w'int\ sd_get_sessions('u .BI "int sd_get_sessions(char***\ " "sessions" ");" .HP \w'int\ sd_get_uids('u .BI "int sd_get_uids(char***\ " "sessions" ");" .SH "DESCRIPTION" .PP \fBsd_get_seats()\fR 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 \fBfree\fR(3) call after use\&. Note that instead of an empty array NULL may be returned and should be considered equivalent to an empty array\&. .PP Similar, \fBsd_get_sessions()\fR may be used to determine all current login sessions\&. .PP Similar, \fBsd_get_uids()\fR may be used to determine all Unix users who currently have login sessions\&. .SH "RETURN VALUE" .PP On success \fBsd_get_seats()\fR, \fBsd_get_sessions()\fR and \fBsd_get_uids()\fR return the number of entries in the arrays\&. On failure, these calls return a negative errno\-style error code\&. .SH "NOTES" .PP The \fBsd_get_seats()\fR, \fBsd_get_sessions()\fR and \fBsd_get_uids()\fR interfaces are available as shared library, which can be compiled and linked to with the libsystemd\-login \fBpkg-config\fR(1) file\&. .SH "SEE ALSO" .PP \fBsystemd\fR(1), \fBsd-login\fR(7), \fBsd_session_get_seat\fR(3) .SH "AUTHOR" .PP \fBLennart Poettering\fR <\&lennart@poettering\&.net\&> .RS 4 Developer .RE