chiark / gitweb /
Update man page sources to upstream tag v236 variants.
[elogind.git] / man / sd_bus_get_fd.xml
1 <?xml version='1.0'?> <!--*- Mode: nxml; nxml-child-indent: 2; indent-tabs-mode: nil -*-->
2 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
3 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
4
5 <!--
6   SPDX-License-Identifier: LGPL-2.1+
7
8   This file is part of systemd.
9
10   Copyright 2016 Julian Orth
11
12   systemd is free software; you can redistribute it and/or modify it
13   under the terms of the GNU Lesser General Public License as published by
14   the Free Software Foundation; either version 2.1 of the License, or
15   (at your option) any later version.
16
17   systemd is distributed in the hope that it will be useful, but
18   WITHOUT ANY WARRANTY; without even the implied warranty of
19   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20   Lesser General Public License for more details.
21
22   You should have received a copy of the GNU Lesser General Public License
23   along with systemd; If not, see <http://www.gnu.org/licenses/>.
24 -->
25
26 <refentry id="sd_bus_get_fd">
27
28   <refentryinfo>
29     <title>sd_bus_get_fd</title>
30     <productname>systemd</productname>
31
32     <authorgroup>
33       <author>
34         <firstname>Julian</firstname>
35         <surname>Orth</surname>
36         <email>ju.orth@gmail.com</email>
37       </author>
38     </authorgroup>
39   </refentryinfo>
40
41   <refmeta>
42     <refentrytitle>sd_bus_get_fd</refentrytitle>
43     <manvolnum>3</manvolnum>
44   </refmeta>
45
46   <refnamediv>
47     <refname>sd_bus_get_fd</refname>
48
49     <refpurpose>Get the file descriptor connected to the message bus</refpurpose>
50   </refnamediv>
51
52   <refsynopsisdiv>
53     <funcsynopsis>
54       <funcsynopsisinfo>#include &lt;systemd/sd-bus.h&gt;</funcsynopsisinfo>
55
56       <funcprototype>
57         <funcdef>int <function>sd_bus_get_fd</function></funcdef>
58         <paramdef>sd_bus *<parameter>bus</parameter></paramdef>
59       </funcprototype>
60     </funcsynopsis>
61   </refsynopsisdiv>
62
63   <refsect1>
64     <title>Description</title>
65
66     <para>
67       <function>sd_bus_get_fd()</function> returns the file descriptor used to
68       communicate with the message bus. This descriptor can be used with
69       <citerefentry
70         project='die-net'><refentrytitle>select</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
71       <citerefentry
72         project='die-net'><refentrytitle>poll</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
73       or similar functions to wait for incoming messages.
74     </para>
75
76     <para>
77       If the bus was created with the
78       <citerefentry><refentrytitle>sd_bus_set_fd</refentrytitle><manvolnum>3</manvolnum></citerefentry>
79       function, then the <parameter>input_fd</parameter> used in that call is
80       returned.
81     </para>
82   </refsect1>
83
84   <refsect1>
85     <title>Return Value</title>
86
87     <para>
88       Returns the file descriptor used for incoming messages from the message
89       bus.
90     </para>
91   </refsect1>
92
93   <refsect1>
94     <title>See Also</title>
95
96     <para>
97       <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
98       <citerefentry><refentrytitle>sd-bus</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
99       <citerefentry><refentrytitle>sd_bus_set_fd</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
100     </para>
101   </refsect1>
102
103 </refentry>