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">
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 <firstname>Julian</firstname>
20 <surname>Orth</surname>
21 <email>ju.orth@gmail.com</email>
27 <refentrytitle>sd_bus_get_fd</refentrytitle>
28 <manvolnum>3</manvolnum>
32 <refname>sd_bus_get_fd</refname>
34 <refpurpose>Get the file descriptor connected to the message bus</refpurpose>
39 <funcsynopsisinfo>#include <systemd/sd-bus.h></funcsynopsisinfo>
42 <funcdef>int <function>sd_bus_get_fd</function></funcdef>
43 <paramdef>sd_bus *<parameter>bus</parameter></paramdef>
49 <title>Description</title>
52 <function>sd_bus_get_fd()</function> returns the file descriptor used to
53 communicate with the message bus. This descriptor can be used with
55 project='die-net'><refentrytitle>select</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
57 project='die-net'><refentrytitle>poll</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
58 or similar functions to wait for incoming messages.
62 If the bus was created with the
63 <citerefentry><refentrytitle>sd_bus_set_fd</refentrytitle><manvolnum>3</manvolnum></citerefentry>
64 function, then the <parameter>input_fd</parameter> used in that call is
70 <title>Return Value</title>
73 Returns the file descriptor used for incoming messages from the message
79 <title>See Also</title>
82 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
83 <citerefentry><refentrytitle>sd-bus</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
84 <citerefentry><refentrytitle>sd_bus_set_fd</refentrytitle><manvolnum>3</manvolnum></citerefentry>,