From ba4b35669ef233fef414b1429fbdc085537b33e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Thu, 2 Oct 2014 20:49:30 -0400 Subject: [PATCH] man: add sd_event_get_fd(3) Example from Tom Gundersen is included using xi:include. The copyright notice stands out a bit. Maybe it should be removed, and the code placed in public domain. --- Makefile-man.am | 2 + man/sd_event_get_fd.xml | 137 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 139 insertions(+) create mode 100644 man/sd_event_get_fd.xml diff --git a/Makefile-man.am b/Makefile-man.am index 2b3fa95e70..aff5186c2d 100644 --- a/Makefile-man.am +++ b/Makefile-man.am @@ -733,6 +733,7 @@ MANPAGES += \ man/sd_event_add_defer.3 \ man/sd_event_add_signal.3 \ man/sd_event_add_time.3 \ + man/sd_event_get_fd.3 \ man/sd_event_new.3 \ man/systemd-bus-proxyd.8 \ man/systemd-bus-proxyd@.service.8 @@ -1574,6 +1575,7 @@ EXTRA_DIST += \ man/sd_event_add_defer.xml \ man/sd_event_add_signal.xml \ man/sd_event_add_time.xml \ + man/sd_event_get_fd.xml \ man/sd_event_new.xml \ man/sd_get_seats.xml \ man/sd_id128_get_machine.xml \ diff --git a/man/sd_event_get_fd.xml b/man/sd_event_get_fd.xml new file mode 100644 index 0000000000..f60d807136 --- /dev/null +++ b/man/sd_event_get_fd.xml @@ -0,0 +1,137 @@ + + + + + + + + + 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 + + + +