2 <!DOCTYPE refentry PUBLIC
"-//OASIS//DTD DocBook XML V4.2//EN"
3 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
6 SPDX-License-Identifier: LGPL-2.1+
8 Copyright © 2016 Julian Orth
11 <refentry id=
"sd_bus_get_fd">
14 <title>sd_bus_get_fd
</title>
15 <productname>systemd
</productname>
19 <refentrytitle>sd_bus_get_fd
</refentrytitle>
20 <manvolnum>3</manvolnum>
24 <refname>sd_bus_get_fd
</refname>
26 <refpurpose>Get the file descriptor connected to the message bus
</refpurpose>
31 <funcsynopsisinfo>#include
<systemd/sd-bus.h
></funcsynopsisinfo>
34 <funcdef>int
<function>sd_bus_get_fd
</function></funcdef>
35 <paramdef>sd_bus *
<parameter>bus
</parameter></paramdef>
41 <title>Description
</title>
44 <function>sd_bus_get_fd()
</function> returns the file descriptor used to
45 communicate with the message bus. This descriptor can be used with
47 project='die-net'
><refentrytitle>select
</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
49 project='die-net'
><refentrytitle>poll
</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
50 or similar functions to wait for incoming messages.
54 If the bus was created with the
55 <citerefentry><refentrytitle>sd_bus_set_fd
</refentrytitle><manvolnum>3</manvolnum></citerefentry>
56 function, then the
<parameter>input_fd
</parameter> used in that call is
62 <title>Return Value
</title>
65 Returns the file descriptor used for incoming messages from the message
71 <title>See Also
</title>
74 <citerefentry><refentrytitle>systemd
</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
75 <citerefentry><refentrytitle>sd-bus
</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
76 <citerefentry><refentrytitle>sd_bus_set_fd
</refentrytitle><manvolnum>3</manvolnum></citerefentry>,