Debian Codegraph @

upstream/debian-unstable/man3/sd_varlink_set_relative_timeout.3

raw
1 '\" t
2 .TH "SD_VARLINK_SET_RELATIVE_TIMEOUT" "3" "" "systemd 261~rc3" "sd_varlink_set_relative_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_varlink_set_relative_timeout \- Set method call time\-out
24 .SH "SYNOPSIS"
25 .sp
26 .ft B
27 .nf
28 #include <systemd/sd\-varlink\&.h>
29 .fi
30 .ft
31 .HP \w'int\ sd_varlink_set_relative_timeout('u
32 .BI "int sd_varlink_set_relative_timeout(sd_varlink\ *" "link" ", uint64_t\ " "usec" ");"
33 .SH "DESCRIPTION"
34 .PP
35 \fBsd_varlink_set_relative_timeout()\fR
36 sets the relative timeout in \(mcs to enforce on Varlink method calls\&. A default time\-out of 45s (currently) applies, which may be changed with this call\&. Set to
37 \fBUINT64_MAX\fR
38 to disable the time\-out, and to 0 to revert to revert back to the default time\-out\&. The time\-out begins whenever a method call is started, and if no response is received by the time the time\-out elapses a synthetic
39 \fBio\&.systemd\&.TimedOut\fR
40 error is raised as client\-generated reply to the method call\&.
41 .PP
42 This call is particularly useful for method calls issued via
43 \fBsd_varlink_observe()\fR
44 that shall remain open continuously for a long time\&.
45 .SH "RETURN VALUE"
46 .PP
47 On success,
48 \fBsd_varlink_set_relative_timeout()\fR
49 returns a non\-negative integer\&. On failure, it returns a negative errno\-style error code\&.
50 .SS "Errors"
51 .PP
52 Returned errors may indicate the following problems:
53 .PP
54 \fB\-EINVAL\fR
55 .RS 4
56 An argument is invalid\&.
57 .RE
58 .SH "NOTES"
59 .PP
60 Functions described here are available as a shared library, which can be compiled against and linked to with the
61 \fBlibsystemd\fR\ \&\fBpkg-config\fR(1)
62 file\&.
63 .PP
64 The code described here uses
65 \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
66 \fBsetenv\fR(3)
67 from a parallel thread\&. It is recommended to only do calls to
68 \fBsetenv()\fR
69 from an early phase of the program when no other threads have been started\&.
70 .SH "HISTORY"
71 .PP
72 \fBsd_varlink_set_relative_timeout()\fR
73 was added in version 257\&.
74 .SH "SEE ALSO"
75 .PP
76 \fBsystemd\fR(1), \fBsd-varlink\fR(3)