From: Zbigniew Jędrzejewski-Szmek Date: Fri, 3 Oct 2014 00:49:30 +0000 (-0400) Subject: man: add sd_event_get_fd(3) X-Git-Tag: v217~354 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ba4b35669ef233fef414b1429fbdc085537b33e7;p=platform%2Fupstream%2Fsystemd.git 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. --- 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 + + + +