summaryrefslogtreecommitdiff
path: root/man/sd_event_add_io.xml
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2019-04-08 14:43:37 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2019-04-08 15:09:30 +0200
commit30ab7a519ebecccd164f1c352d8afef97132f6f2 (patch)
treecc28410746e8857ff0decdc7f258e2259bf326ae /man/sd_event_add_io.xml
parent4ea0f675aef5996ccdb97adc9700564d18f95901 (diff)
downloadsystemd-30ab7a519ebecccd164f1c352d8afef97132f6f2.tar.gz
man: elaborate on fd ownership in sd_event_add_io(3)
Replaces: #12239
Diffstat (limited to 'man/sd_event_add_io.xml')
-rw-r--r--man/sd_event_add_io.xml6
1 files changed, 6 insertions, 0 deletions
diff --git a/man/sd_event_add_io.xml b/man/sd_event_add_io.xml
index 4f2b09bf59..398b938e3c 100644
--- a/man/sd_event_add_io.xml
+++ b/man/sd_event_add_io.xml
@@ -161,6 +161,12 @@
"floating", and will be destroyed implicitly when the event loop
itself is destroyed.</para>
+ <para>Note that this call does not take possession of the file descriptor passed in, ownership (and thus
+ the duty to close it when it is no longer needed) remains with the caller. However, with the
+ <function>sd_event_source_set_io_fd_own()</function> call (see below) the event source may optionally
+ take ownership of the file descriptor after the event source has been created. In that case the file
+ descriptor is closed automatically as soon as the event source is released.</para>
+
<para>It is recommended to use
<function>sd_event_add_io()</function> only in conjunction with
file descriptors that have <constant>O_NONBLOCK</constant> set, to