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