Debian Codegraph @

upstream/debian-unstable/man3/sd_bus_set_method_call_timeout.3

raw
1 '\" t
2 .TH "SD_BUS_SET_METHOD_CALL_TIMEOUT" "3" "" "systemd 261~rc3" "sd_bus_set_method_call_timeout"
3 .\" -----------------------------------------------------------------
4 .\" * Define some portability stuff
5 .\" -----------------------------------------------------------------
6 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
7 .\" http://bugs.debian.org/507673
8 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
9 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
10 .ie \n(.g .ds Aq \(aq
11 .el .ds Aq '
12 .\" -----------------------------------------------------------------
13 .\" * set default formatting
14 .\" -----------------------------------------------------------------
15 .\" disable hyphenation
16 .nh
17 .\" disable justification (adjust text to left margin only)
18 .ad l
19 .\" -----------------------------------------------------------------
20 .\" * MAIN CONTENT STARTS HERE *
21 .\" -----------------------------------------------------------------
22 .SH "NAME"
23 sd_bus_set_method_call_timeout, sd_bus_get_method_call_timeout \- Set or query the default D\-Bus method call timeout of a bus object
24 .SH "SYNOPSIS"
25 .sp
26 .ft B
27 .nf
28 #include <systemd/sd\-bus\&.h>
29 .fi
30 .ft
31 .HP \w'int\ sd_bus_set_method_call_timeout('u
32 .BI "int sd_bus_set_method_call_timeout(sd_bus\ *" "bus" ", uint64_t\ " "usec" ");"
33 .HP \w'int\ sd_bus_get_method_call_timeout('u
34 .BI "int sd_bus_get_method_call_timeout(sd_bus\ *" "bus" ", uint64_t\ *" "ret" ");"
35 .SH "DESCRIPTION"
36 .PP
37 \fBsd_bus_set_method_call_timeout()\fR
38 sets the default D\-Bus method call timeout of
39 \fIbus\fR
40 to
41 \fIusec\fR
42 microseconds\&.
43 .PP
44 \fBsd_bus_get_method_call_timeout()\fR
45 queries the default D\-Bus method call timeout of
46 \fIbus\fR\&. If no method call timeout was set using
47 \fBsd_bus_set_method_call_timeout()\fR, the timeout is read from the
48 \fI$SYSTEMD_BUS_TIMEOUT\fR
49 environment variable\&. If this environment variable is unset or does not contain a valid timeout, the implementation falls back to a predefined method call timeout of 25 seconds\&. Note that
50 \fI$SYSTEMD_BUS_TIMEOUT\fR
51 is read once and cached so callers should not rely on being able to change the default method call timeout at runtime by changing the value of
52 \fI$SYSTEMD_BUS_TIMEOUT\fR\&. Instead, call
53 \fBsd_bus_set_method_call_timeout()\fR
54 to change the default method call timeout\&.
55 .SH "RETURN VALUE"
56 .PP
57 On success, these functions return a non\-negative integer\&. On failure, they return a negative errno\-style error code\&.
58 .SS "Errors"
59 .PP
60 Returned errors may indicate the following problems:
61 .PP
62 \fB\-EINVAL\fR
63 .RS 4
64 The parameters
65 \fIbus\fR
66 or
67 \fIret\fR
68 are
69 \fBNULL\fR\&.
70 .sp
71 Added in version 246\&.
72 .RE
73 .PP
74 \fB\-ENOPKG\fR
75 .RS 4
76 Bus object
77 \fIbus\fR
78 could not be resolved\&.
79 .sp
80 Added in version 246\&.
81 .RE
82 .SH "NOTES"
83 .PP
84 Functions described here are available as a shared library, which can be compiled against and linked to with the
85 \fBlibsystemd\fR\ \&\fBpkg-config\fR(1)
86 file\&.
87 .PP
88 The code described here uses
89 \fBgetenv\fR(3), which is declared to be not multi\-thread\-safe\&. This means that the code calling the functions described here must not call
90 \fBsetenv\fR(3)
91 from a parallel thread\&. It is recommended to only do calls to
92 \fBsetenv()\fR
93 from an early phase of the program when no other threads have been started\&.
94 .SH "HISTORY"
95 .PP
96 \fBsd_bus_set_method_call_timeout()\fR
97 and
98 \fBsd_bus_get_method_call_timeout()\fR
99 were added in version 246\&.
100 .SH "SEE ALSO"
101 .PP
102 \fBsystemd\fR(1), \fBsd-bus\fR(3), \fBsd_bus_call\fR(3)