~ubuntu-branches/debian/jessie/systemd/jessie

« back to all changes in this revision

Viewing changes to man/sd_login_monitor_new.3

  • Committer: Package Import Robot
  • Author(s): Tollef Fog Heen, Tollef Fog Heen, Michael Biebl
  • Date: 2012-04-03 19:59:17 UTC
  • mfrom: (1.1.10) (6.1.3 experimental)
  • Revision ID: package-import@ubuntu.com-20120403195917-l532urrbg4pkreas
Tags: 44-1
[ Tollef Fog Heen ]
* New upstream version.
  - Backport 3492207: journal: PAGE_SIZE is not known on ppc and other
    archs
  - Backport 5a2a2a1: journal: react with immediate rotation to a couple
    of more errors
  - Backport 693ce21: util: never follow symlinks in rm_rf_children()
    Fixes CVE-2012-1174, closes: #664364
* Drop output message from init-functions hook, it's pointless.
* Only rmdir /lib/init/rw if it exists.
* Explicitly order debian-fixup before sysinit.target to prevent a
  possible race condition with the creation of sockets.  Thanks to
  Michael Biebl for debugging this.
* Always restart the initctl socket on upgrades, to mask sysvinit
  removing it.

[ Michael Biebl ]
* Remove workaround for non-interactive sessions from pam config again.
* Create compat /dev/initctl symlink in case we are upgrading from a system
  running a newer version of sysvinit (using /run/initctl) and sysvinit is
  replaced with systemd-sysv during the upgrade. Closes: #663219
* Install new man pages.
* Build-Depend on valac (>= 0.12) instead of valac-0.12. Closes: #663323

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
'\" t
 
2
.\"     Title: sd_login_monitor_new
 
3
.\"    Author: Lennart Poettering <lennart@poettering.net>
 
4
.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
 
5
.\"      Date: 03/16/2012
 
6
.\"    Manual: sd_login_monitor_new
 
7
.\"    Source: systemd
 
8
.\"  Language: English
 
9
.\"
 
10
.TH "SD_LOGIN_MONITOR_NEW" "3" "03/16/2012" "systemd" "sd_login_monitor_new"
 
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
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
18
.ie \n(.g .ds Aq \(aq
 
19
.el       .ds Aq '
 
20
.\" -----------------------------------------------------------------
 
21
.\" * set default formatting
 
22
.\" -----------------------------------------------------------------
 
23
.\" disable hyphenation
 
24
.nh
 
25
.\" disable justification (adjust text to left margin only)
 
26
.ad l
 
27
.\" -----------------------------------------------------------------
 
28
.\" * MAIN CONTENT STARTS HERE *
 
29
.\" -----------------------------------------------------------------
 
30
.SH "NAME"
 
31
sd_login_monitor_new, sd_login_monitor_unref, sd_login_monitor_flush, sd_login_monitor_get_fd \- Monitor login sessions, seats and users
 
32
.SH "SYNOPSIS"
 
33
.sp
 
34
.ft B
 
35
.nf
 
36
#include <systemd/sd\-login\&.h>
 
37
.fi
 
38
.ft
 
39
.HP \w'int\ sd_login_monitor_new('u
 
40
.BI "int sd_login_monitor_new(const\ char*\ " "category" ", sd_login_monitor**\ " "ret" ");"
 
41
.HP \w'sd_login_monitor*\ sd_login_monitor_unref('u
 
42
.BI "sd_login_monitor* sd_login_monitor_unref(sd_login_monitor*\ " "m" ");"
 
43
.HP \w'int\ sd_login_monitor_flush('u
 
44
.BI "int sd_login_monitor_flush(sd_login_monitor*\ " "m" ");"
 
45
.HP \w'int\ sd_login_monitor_get_fd('u
 
46
.BI "int sd_login_monitor_get_fd(sd_login_monitor*\ " "m" ");"
 
47
.SH "DESCRIPTION"
 
48
.PP
 
49
\fBsd_login_monitor_new()\fR
 
50
may be used to monitor login session, users and seats\&. Via a monitor object a file descriptor can be integrated into an application defined event loop which is woken up each time a user logs in, logs out or a seat is added or removed, or a session, user, or seat changes state otherwise\&. The first parameter takes a string which can be either
 
51
seat
 
52
(to get only notifications about seats being added, removed or changed),
 
53
session
 
54
(to get only notifications about sessions being created or removed or changed) or
 
55
uid
 
56
(to get only notifications when a user changes state in respect to logins)\&. If notifications shall be generated in all these conditions, NULL may be passed\&. Note that in future additional categories may be defined\&. The second parameter returns a monitor object and needs to be freed with the
 
57
\fBsd_login_monitor_unref()\fR
 
58
call after use\&.
 
59
.PP
 
60
\fBsd_login_monitor_unref()\fR
 
61
may be used to destroy a monitor object\&. Note that this will invalidate any file descriptor returned by
 
62
\fBsd_login_monitor_get_fd()\fR\&.
 
63
.PP
 
64
\fBsd_login_monitor_flush()\fR
 
65
may be used to reset the wakeup state of the monitor object\&. Whenever an event causes the monitor to wake up the event loop via the file descriptor this function needs to be called to reset the wake\-up state\&. If this call is not invoked the file descriptor will immediately wake up the event loop again\&.
 
66
.PP
 
67
\fBsd_login_monitor_get_fd()\fR
 
68
may be used to retrieve the file descriptor of the monitor object that may be integrated in an application defined event loop, based around
 
69
\fBpoll\fR(2)
 
70
or a similar interface\&. The application should include the returned file descriptor as wake up source for POLLIN events\&. Whenever a wake\-up is triggered the file descriptor needs to be reset via
 
71
\fBsd_login_monitor_flush()\fR\&. An application needs to reread the login state with a function like
 
72
\fBsd_get_seats\fR(3)
 
73
or similar to determine what changed\&.
 
74
.SH "RETURN VALUE"
 
75
.PP
 
76
On success
 
77
\fBsd_login_monitor_new()\fR
 
78
and
 
79
\fBsd_login_monitor_flush()\fR
 
80
return 0 or a positive integer\&. On success
 
81
\fBsd_login_monitor_get_fd()\fR
 
82
returns a Unix file descriptor\&. On failure, these calls return a negative errno\-style error code\&.
 
83
.PP
 
84
\fBsd_login_monitor_unref()\fR
 
85
always returns NULL\&.
 
86
.SH "NOTES"
 
87
.PP
 
88
The
 
89
\fBsd_login_monitor_new()\fR,
 
90
\fBsd_login_monitor_unref()\fR,
 
91
\fBsd_login_monitor_flush()\fR
 
92
and
 
93
\fBsd_login_monitor_get_fd()\fR
 
94
interfaces are available as shared library, which can be compiled and linked to with the
 
95
libsystemd\-login
 
96
\fBpkg-config\fR(1)
 
97
file\&.
 
98
.SH "SEE ALSO"
 
99
.PP
 
100
 
 
101
\fBsystemd\fR(1),
 
102
\fBsd-login\fR(7),
 
103
\fBsd_get_seats\fR(3)
 
104
.SH "AUTHOR"
 
105
.PP
 
106
\fBLennart Poettering\fR <\&lennart@poettering\&.net\&>
 
107
.RS 4
 
108
Developer
 
109
.RE