1SD_BUS_SET_METHOD_CALL_TIsMdE_ObUuTs(_3s)et_method_callS_Dt_iBmUeSo_uStET_METHOD_CALL_TIMEOUT(3)
2
3
4

NAME

6       sd_bus_set_method_call_timeout, sd_bus_get_method_call_timeout - Set or
7       query the default D-Bus method call timeout of a bus object
8

SYNOPSIS

10       #include <systemd/sd-bus.h>
11
12       int sd_bus_set_method_call_timeout(sd_bus *bus, uint64_t usec);
13
14       int sd_bus_get_method_call_timeout(sd_bus *bus, uint64_t *ret);
15

DESCRIPTION

17       sd_bus_set_method_call_timeout() sets the default D-Bus method call
18       timeout of bus to usec microseconds.
19
20       sd_bus_get_method_call_timeout() queries the default D-Bus method call
21       timeout of bus. If no method call timeout was set using
22       sd_bus_set_method_call_timeout(), the timeout is read from the
23       $SYSTEMD_BUS_TIMEOUT environment variable. If this environment variable
24       is unset or does not contain a valid timeout, the implementation falls
25       back to a predefined method call timeout of 25 seconds. Note that
26       $SYSTEMD_BUS_TIMEOUT is read once and cached so callers should not rely
27       on being able to change the default method call timeout at runtime by
28       changing the value of $SYSTEMD_BUS_TIMEOUT. Instead, call
29       sd_bus_set_method_call_timeout() to change the default method call
30       timeout.
31

RETURN VALUE

33       On success, these functions return a non-negative integer. On failure,
34       they return a negative errno-style error code.
35
36   Errors
37       Returned errors may indicate the following problems:
38
39       -EINVAL
40           The parameters bus or ret are NULL.
41
42       -ENOPKG
43           Bus object bus could not be resolved.
44

NOTES

46       Functions described here are available as a shared library, which can
47       be compiled against and linked to with the libsystemd pkg-config(1)
48       file.
49
50       The code described here uses getenv(3), which is declared to be not
51       multi-thread-safe. This means that the code calling the functions
52       described here must not call setenv(3) from a parallel thread. It is
53       recommended to only do calls to setenv() from an early phase of the
54       program when no other threads have been started.
55

SEE ALSO

57       systemd(1), sd-bus(3), sd_bus_call(3)
58
59
60
61systemd 254                                  SD_BUS_SET_METHOD_CALL_TIMEOUT(3)
Impressum