summaryrefslogtreecommitdiff
path: root/man/sd_login_monitor.html
diff options
context:
space:
mode:
Diffstat (limited to 'man/sd_login_monitor.html')
-rw-r--r--man/sd_login_monitor.html45
1 files changed, 22 insertions, 23 deletions
diff --git a/man/sd_login_monitor.html b/man/sd_login_monitor.html
index cfacf69caf..95b4d4638e 100644
--- a/man/sd_login_monitor.html
+++ b/man/sd_login_monitor.html
@@ -19,24 +19,24 @@
<a href="systemd.directives.html">Directives </a>·
<a href="../python-systemd/index.html">Python </a>·
<a href="../libudev/index.html">libudev </a>·
- <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 204</span><hr><div class="refentry"><a name="sd_login_monitor_new"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_login_monitor_new, sd_login_monitor_unref, sd_login_monitor_flush, sd_login_monitor_get_fd, sd_login_monitor_get_events, sd_login_monitor_get_timeout, sd_login_monitor — Monitor login sessions, seats, users and virtual machines/containers</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-login.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_login_monitor_new</b>(</code></td><td>const char* <var class="pdparam">category</var>, </td></tr><tr><td> </td><td>sd_login_monitor** <var class="pdparam">ret</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">sd_login_monitor* <b class="fsfunc">sd_login_monitor_unref</b>(</code></td><td>sd_login_monitor* <var class="pdparam">m</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_login_monitor_flush</b>(</code></td><td>sd_login_monitor* <var class="pdparam">m</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_login_monitor_get_fd</b>(</code></td><td>sd_login_monitor* <var class="pdparam">m</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_login_monitor_get_events</b>(</code></td><td>sd_login_monitor* <var class="pdparam">m</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_login_monitor_get_timeout</b>(</code></td><td>sd_login_monitor* <var class="pdparam">m</var>, </td></tr><tr><td> </td><td>uint64_t* <var class="pdparam">timeout_usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm259778088720"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_login_monitor_new()</code> may
- be used to monitor login sessions, users, seats and
+ <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 208</span><hr><div class="refentry"><a name="sd_login_monitor_new"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_login_monitor_new, sd_login_monitor_unref, sd_login_monitor_flush, sd_login_monitor_get_fd, sd_login_monitor_get_events, sd_login_monitor_get_timeout, sd_login_monitor — Monitor login sessions, seats, users and virtual machines/containers</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-login.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_login_monitor_new</b>(</code></td><td>const char* <var class="pdparam">category</var>, </td></tr><tr><td> </td><td>sd_login_monitor** <var class="pdparam">ret</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">sd_login_monitor* <b class="fsfunc">sd_login_monitor_unref</b>(</code></td><td>sd_login_monitor* <var class="pdparam">m</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_login_monitor_flush</b>(</code></td><td>sd_login_monitor* <var class="pdparam">m</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_login_monitor_get_fd</b>(</code></td><td>sd_login_monitor* <var class="pdparam">m</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_login_monitor_get_events</b>(</code></td><td>sd_login_monitor* <var class="pdparam">m</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_login_monitor_get_timeout</b>(</code></td><td>sd_login_monitor* <var class="pdparam">m</var>, </td></tr><tr><td> </td><td>uint64_t* <var class="pdparam">timeout_usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm274676550160"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_login_monitor_new()</code> may
+ be used to monitor login sessions, users, seats, and
virtual machines/containers. 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, seat or virtual machine/container
changes state otherwise. The first parameter takes a
- string which can be <code class="literal">seat</code> (to get
+ string which can be "<code class="literal">seat</code>" (to get
only notifications about seats being added, removed or
- changed), <code class="literal">session</code> (to get only
+ changed), "<code class="literal">session</code>" (to get only
notifications about sessions being created or removed
- or changed), <code class="literal">uid</code> (to get only
+ or changed), "<code class="literal">uid</code>" (to get only
notifications when a user changes state in respect to
- logins) or <code class="literal">machine</code> (to get only
+ logins) or "<code class="literal">machine</code>" (to get only
notifications when a virtual machine or container is
started or stopped). If notifications shall be
- generated in all these conditions, NULL may be
+ generated in all these conditions, <code class="constant">NULL</code> may be
passed. Note that in the future additional categories
may be defined. The second parameter returns a monitor
object and needs to be freed with the
@@ -49,7 +49,7 @@
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
+ state. If this call is not invoked, the file descriptor
will immediately wake up the event loop again.</p><p><code class="function">sd_login_monitor_get_fd()</code>
may be used to retrieve the file descriptor of the
monitor object that may be integrated in an
@@ -70,20 +70,20 @@
or similar to determine what changed.</p><p><code class="function">sd_login_monitor_get_events()</code>
will return the <code class="function">poll()</code> mask to
wait for. This function will return a combination of
- <code class="literal">POLLIN</code>, <code class="literal">POLLOUT</code>
+ <code class="constant">POLLIN</code>, <code class="constant">POLLOUT</code>
and similar to fill into the
- <code class="literal">.events</code> field of <code class="literal">struct
+ "<code class="literal">.events</code>" field of <code class="varname">struct
pollfd</code>.</p><p><code class="function">sd_login_monitor_get_timeout()</code>
will return a timeout value for usage in
<code class="function">poll()</code>. This returns a value in
- microseconds since the epoch of CLOCK_MONOTONIC for
- timing out <code class="function">poll()</code> in
- <code class="literal">timeout_usec</code>. See
+ microseconds since the epoch of <code class="constant">CLOCK_MONOTONIC</code>
+ for timing out <code class="function">poll()</code> in
+ <code class="varname">timeout_usec</code>. See
<a href="clock_gettime.html"><span class="citerefentry"><span class="refentrytitle">clock_gettime</span>(2)</span></a>
for details about
- <code class="literal">CLOCK_MONOTONIC</code>. If there's no
+ <code class="constant">CLOCK_MONOTONIC</code>. If there is no
timeout to wait for this will fill in
- <code class="literal">(uint64_t) -1</code> instead. Note that
+ <code class="constant">(uint64_t) -1</code> instead. Note that
<code class="function">poll()</code> takes a relative timeout
in milliseconds rather than an absolute timeout in
microseconds. To convert the absolute 'us' timeout into
@@ -99,10 +99,10 @@ else {
n = (uint64_t) ts.tv_sec * 1000000 + ts.tv_nsec / 1000;
msec = t &gt; n ? (int) ((t - n + 999) / 1000) : 0;
}</pre><p>The code above does not do any error checking
- for brevity's sake. The calculated <code class="literal">msec</code>
+ for brevity's sake. The calculated <code class="varname">msec</code>
integer can be passed directly as
<code class="function">poll()</code>'s timeout
- parameter.</p></div><div class="refsect1"><a name="idm259781952240"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success
+ parameter.</p></div><div class="refsect1"><a name="idm274676514784"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success
<code class="function">sd_login_monitor_new()</code>,
<code class="function">sd_login_monitor_flush()</code> and
<code class="function">sd_login_monitor_get_timeout()</code>
@@ -110,11 +110,11 @@ else {
<code class="function">sd_login_monitor_get_fd()</code> returns
a Unix file descriptor. On success
<code class="function">sd_login_monitor_get_events()</code>
- returns a combination of <code class="literal">POLLIN</code>,
- <code class="literal">POLLOUT</code> and suchlike. On failure,
+ returns a combination of <code class="constant">POLLIN</code>,
+ <code class="constant">POLLOUT</code> and suchlike. On failure,
these calls return a negative errno-style error
code.</p><p><code class="function">sd_login_monitor_unref()</code>
- always returns NULL.</p></div><div class="refsect1"><a name="idm259781944896"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_login_monitor_new()</code>,
+ always returns <code class="constant">NULL</code>.</p></div><div class="refsect1"><a name="idm274676507376"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_login_monitor_new()</code>,
<code class="function">sd_login_monitor_unref()</code>,
<code class="function">sd_login_monitor_flush()</code>,
<code class="function">sd_login_monitor_get_fd()</code>,
@@ -122,9 +122,8 @@ else {
<code class="function">sd_login_monitor_get_timeout()</code>
interfaces are available as shared library, which can
be compiled and linked to with the
- <code class="literal">libsystemd-login</code>
- <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
- file.</p></div><div class="refsect1"><a name="idm259781937632"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+ <code class="constant">libsystemd-login</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+ file.</p></div><div class="refsect1"><a name="idm274671534880"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
<a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
<a href="sd-login.html"><span class="citerefentry"><span class="refentrytitle">sd-login</span>(3)</span></a>,
<a href="sd_get_seats.html"><span class="citerefentry"><span class="refentrytitle">sd_get_seats</span>(3)</span></a>,