sd_event_get_fd
systemd
More text
Zbigniew
Jędrzejewski-Szmek
zbyszek@in.waw.pl
sd_event_get_fd
3
sd_event_get_fd
Obtain a file descriptor to poll for event loop events
#include <systemd/sd-bus.h>
int sd_event_get_fd
sd_bus *event
Description
sd_event_get_fd() returns the file
descriptor that the event loop object returned by the
sd_event_new3
function uses to wait for events. This file descriptor can be
polled for events. This makes it possible to embed the
sd-event3
event loop inside of another event loop.
Return Value
On success, sd_event_get_fd() returns a
non-negative integer. On failure, it returns a negative
errno-style error code.
Errors
Returned errors may indicate the following problems:
-EINVAL
event is not a valid
pointer to an sd_event structure.
-ECHILD
The event loop has been created in a different process.
Examples
Integration in glib event loop
Notes
sd_event_get_fd() is available as a
shared library, which can be compiled and linked to with the
libsystemd pkg-config1
file.
See Also
sd-event3,
sd_event_new3,
sd_event_ref3