summaryrefslogtreecommitdiff
path: root/man
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2018-06-07 13:07:52 +0200
committerLennart Poettering <lennart@poettering.net>2018-06-07 13:10:56 +0200
commit90b1fa59cfee2d2c469de89e71b6366ebd28a1f3 (patch)
tree12ffb3dd811b1d2a7c7aa4ee0ec926bbfbb601f9 /man
parent15723a1db086a98ec2ccfa8e6134c5b614bf4dce (diff)
downloadsystemd-90b1fa59cfee2d2c469de89e71b6366ebd28a1f3.tar.gz
sd-event: document sd_event_source_set_io_fd_own()
With this we have 100% of the sd-event symbols documented again. Yay!
Diffstat (limited to 'man')
-rw-r--r--man/rules/meson.build4
-rw-r--r--man/sd_event_add_io.xml24
2 files changed, 27 insertions, 1 deletions
diff --git a/man/rules/meson.build b/man/rules/meson.build
index 68b7453a11..04f03c6786 100644
--- a/man/rules/meson.build
+++ b/man/rules/meson.build
@@ -280,9 +280,11 @@ manpages = [
'sd_event_source',
'sd_event_source_get_io_events',
'sd_event_source_get_io_fd',
+ 'sd_event_source_get_io_fd_own',
'sd_event_source_get_io_revents',
'sd_event_source_set_io_events',
- 'sd_event_source_set_io_fd'],
+ 'sd_event_source_set_io_fd',
+ 'sd_event_source_set_io_fd_own'],
''],
['sd_event_add_signal',
'3',
diff --git a/man/sd_event_add_io.xml b/man/sd_event_add_io.xml
index d5ef462e53..bd513a7814 100644
--- a/man/sd_event_add_io.xml
+++ b/man/sd_event_add_io.xml
@@ -38,6 +38,8 @@
<refname>sd_event_source_get_io_revents</refname>
<refname>sd_event_source_get_io_fd</refname>
<refname>sd_event_source_set_io_fd</refname>
+ <refname>sd_event_source_get_io_fd_own</refname>
+ <refname>sd_event_source_set_io_fd_own</refname>
<refname>sd_event_source</refname>
<refname>sd_event_io_handler_t</refname>
@@ -97,6 +99,17 @@
<paramdef>int <parameter>fd</parameter></paramdef>
</funcprototype>
+ <funcprototype>
+ <funcdef>int <function>sd_event_source_get_io_fd_own</function></funcdef>
+ <paramdef>sd_event_source *<parameter>source</parameter></paramdef>
+ </funcprototype>
+
+ <funcprototype>
+ <funcdef>int <function>sd_event_source_set_io_fd_own</function></funcdef>
+ <paramdef>sd_event_source *<parameter>source</parameter></paramdef>
+ <paramdef>int <parameter>b</parameter></paramdef>
+ </funcprototype>
+
</funcsynopsis>
</refsynopsisdiv>
@@ -212,6 +225,17 @@
changes the UNIX file descriptor of an I/O event source created
previously with <function>sd_event_add_io()</function>. It takes
the event source object and the new file descriptor.</para>
+
+ <para><function>sd_event_source_set_io_fd_own()</function> controls whether the file descriptor of the event source
+ shall be closed automatically when the event source is freed, i.e. whether it shall be considered 'owned' by the
+ event source object. By default it is not closed automatically, and the application has to do this on its own. The
+ <parameter>b</parameter> parameter is a boolean parameter: if zero, the file descriptor is not closed automatically
+ when the event source is freed, otherwise it is closed.</para>
+
+ <para><function>sd_event_source_get_io_fd_own()</function> may be used to query the current setting of the file
+ descriptor ownership boolean flag as set with <function>sd_event_source_set_io_fd_own()</function>. It returns
+ positive if the file descriptor is closed automatically when the event source is destroyed, zero if not, and
+ negative on error.</para>
</refsect1>
<refsect1>