man: elaborate on fd ownership in sd_event_add_io(3)

Replaces: #12239
This commit is contained in:
Lennart Poettering 2019-04-08 14:43:37 +02:00 committed by Zbigniew Jędrzejewski-Szmek
parent 4ea0f675ae
commit 30ab7a519e
1 changed files with 6 additions and 0 deletions

View File

@ -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