]>
Commit | Line | Data |
---|---|---|
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 | Copyright 2016 Julian Orth | |
9 | --> | |
10 | ||
11 | <refentry id="sd_bus_get_fd"> | |
12 | ||
13 | <refentryinfo> | |
14 | <title>sd_bus_get_fd</title> | |
15 | <productname>systemd</productname> | |
16 | ||
17 | <authorgroup> | |
18 | <author> | |
19 | <firstname>Julian</firstname> | |
20 | <surname>Orth</surname> | |
21 | <email>ju.orth@gmail.com</email> | |
22 | </author> | |
23 | </authorgroup> | |
24 | </refentryinfo> | |
25 | ||
26 | <refmeta> | |
27 | <refentrytitle>sd_bus_get_fd</refentrytitle> | |
28 | <manvolnum>3</manvolnum> | |
29 | </refmeta> | |
30 | ||
31 | <refnamediv> | |
32 | <refname>sd_bus_get_fd</refname> | |
33 | ||
34 | <refpurpose>Get the file descriptor connected to the message bus</refpurpose> | |
35 | </refnamediv> | |
36 | ||
37 | <refsynopsisdiv> | |
38 | <funcsynopsis> | |
39 | <funcsynopsisinfo>#include <systemd/sd-bus.h></funcsynopsisinfo> | |
40 | ||
41 | <funcprototype> | |
42 | <funcdef>int <function>sd_bus_get_fd</function></funcdef> | |
43 | <paramdef>sd_bus *<parameter>bus</parameter></paramdef> | |
44 | </funcprototype> | |
45 | </funcsynopsis> | |
46 | </refsynopsisdiv> | |
47 | ||
48 | <refsect1> | |
49 | <title>Description</title> | |
50 | ||
51 | <para> | |
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 | |
54 | <citerefentry | |
55 | project='die-net'><refentrytitle>select</refentrytitle><manvolnum>3</manvolnum></citerefentry>, | |
56 | <citerefentry | |
57 | project='die-net'><refentrytitle>poll</refentrytitle><manvolnum>3</manvolnum></citerefentry>, | |
58 | or similar functions to wait for incoming messages. | |
59 | </para> | |
60 | ||
61 | <para> | |
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 | |
65 | returned. | |
66 | </para> | |
67 | </refsect1> | |
68 | ||
69 | <refsect1> | |
70 | <title>Return Value</title> | |
71 | ||
72 | <para> | |
73 | Returns the file descriptor used for incoming messages from the message | |
74 | bus. | |
75 | </para> | |
76 | </refsect1> | |
77 | ||
78 | <refsect1> | |
79 | <title>See Also</title> | |
80 | ||
81 | <para> | |
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>, | |
85 | </para> | |
86 | </refsect1> | |
87 | ||
88 | </refentry> |