]> git.ipfire.org Git - thirdparty/systemd.git/blob - man/sd_bus_get_fd.xml
Merge pull request #9116 from poettering/tmpfiles-tmp-var-tmp
[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 SPDX-License-Identifier: LGPL-2.1+
7
8 This file is part of systemd.
9
10 Copyright 2016 Julian Orth
11 -->
12
13 <refentry id="sd_bus_get_fd">
14
15 <refentryinfo>
16 <title>sd_bus_get_fd</title>
17 <productname>systemd</productname>
18
19 <authorgroup>
20 <author>
21 <firstname>Julian</firstname>
22 <surname>Orth</surname>
23 <email>ju.orth@gmail.com</email>
24 </author>
25 </authorgroup>
26 </refentryinfo>
27
28 <refmeta>
29 <refentrytitle>sd_bus_get_fd</refentrytitle>
30 <manvolnum>3</manvolnum>
31 </refmeta>
32
33 <refnamediv>
34 <refname>sd_bus_get_fd</refname>
35
36 <refpurpose>Get the file descriptor connected to the message bus</refpurpose>
37 </refnamediv>
38
39 <refsynopsisdiv>
40 <funcsynopsis>
41 <funcsynopsisinfo>#include &lt;systemd/sd-bus.h&gt;</funcsynopsisinfo>
42
43 <funcprototype>
44 <funcdef>int <function>sd_bus_get_fd</function></funcdef>
45 <paramdef>sd_bus *<parameter>bus</parameter></paramdef>
46 </funcprototype>
47 </funcsynopsis>
48 </refsynopsisdiv>
49
50 <refsect1>
51 <title>Description</title>
52
53 <para>
54 <function>sd_bus_get_fd()</function> returns the file descriptor used to
55 communicate with the message bus. This descriptor can be used with
56 <citerefentry
57 project='die-net'><refentrytitle>select</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
58 <citerefentry
59 project='die-net'><refentrytitle>poll</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
60 or similar functions to wait for incoming messages.
61 </para>
62
63 <para>
64 If the bus was created with the
65 <citerefentry><refentrytitle>sd_bus_set_fd</refentrytitle><manvolnum>3</manvolnum></citerefentry>
66 function, then the <parameter>input_fd</parameter> used in that call is
67 returned.
68 </para>
69 </refsect1>
70
71 <refsect1>
72 <title>Return Value</title>
73
74 <para>
75 Returns the file descriptor used for incoming messages from the message
76 bus.
77 </para>
78 </refsect1>
79
80 <refsect1>
81 <title>See Also</title>
82
83 <para>
84 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
85 <citerefentry><refentrytitle>sd-bus</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
86 <citerefentry><refentrytitle>sd_bus_set_fd</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
87 </para>
88 </refsect1>
89
90 </refentry>