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 This file is part of systemd.
10 Copyright 2016 Julian Orth
13 <refentry id="sd_bus_get_fd">
16 <title>sd_bus_get_fd</title>
17 <productname>systemd</productname>
21 <firstname>Julian</firstname>
22 <surname>Orth</surname>
23 <email>ju.orth@gmail.com</email>
29 <refentrytitle>sd_bus_get_fd</refentrytitle>
30 <manvolnum>3</manvolnum>
34 <refname>sd_bus_get_fd</refname>
36 <refpurpose>Get the file descriptor connected to the message bus</refpurpose>
41 <funcsynopsisinfo>#include <systemd/sd-bus.h></funcsynopsisinfo>
44 <funcdef>int <function>sd_bus_get_fd</function></funcdef>
45 <paramdef>sd_bus *<parameter>bus</parameter></paramdef>
51 <title>Description</title>
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
57 project='die-net'><refentrytitle>select</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
59 project='die-net'><refentrytitle>poll</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
60 or similar functions to wait for incoming messages.
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
72 <title>Return Value</title>
75 Returns the file descriptor used for incoming messages from the message
81 <title>See Also</title>
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>,