1SD_BUS_ENQUEUE_FOR_READ(3)  sd_bus_enqueue_for_read SD_BUS_ENQUEUE_FOR_READ(3)
2
3
4

NAME

6       sd_bus_enqueue_for_read - Re-enqueue a bus message on a bus connection,
7       for reading
8

SYNOPSIS

10       #include <systemd/sd-bus.h>
11
12       int sd_bus_enqueue_for_read(sd_bus *bus, sd_bus_message *message);
13

DESCRIPTION

15       sd_bus_enqueue_for_read() may be used to re-enqueue an incoming bus
16       message on the local read queue, so that it is processed and dispatched
17       locally again, similarly to how an incoming message from the peer is
18       processed. Takes a bus connection object and the message to enqueue. A
19       reference is taken of the message and the caller's reference thus
20       remains in possession of the caller. The message is enqueued at the end
21       of the queue, thus will be dispatched after all other already queued
22       messages are dispatched.
23
24       This call is primarily useful for dealing with incoming method calls
25       that may be processed only after an additional asynchronous operation
26       completes. One example are PolicyKit authorization requests that are
27       determined to be necessary to authorize a newly incoming method call:
28       when the PolicyKit response is received the original method call may be
29       re-enqueued to process it again, this time with the authorization
30       result known.
31

RETURN VALUE

33       On success, this function return 0 or a positive integer. On failure,
34       it returns a negative errno-style error code.
35
36   Errors
37       Returned errors may indicate the following problems:
38
39       -ECHILD
40           The bus connection has been created in a different process, library
41           or module instance.
42

NOTES

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

SEE ALSO

55       systemd(1), sd-bus(3), sd_bus_send(3),
56
57
58
59systemd 254                                         SD_BUS_ENQUEUE_FOR_READ(3)
Impressum