chiark / gitweb /
tree-wide: remove Lennart's copyright lines
[elogind.git] / man / sd_event_add_io.xml
index 3ba7c3bd3e4eff6b3f990001fedfb740708909c5..70831223194e870ece2d3ca4fc034fa61fc70fbc 100644 (file)
@@ -3,22 +3,7 @@
 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
 
 <!--
-  This file is part of elogind.
-
-  Copyright 2015 Lennart Poettering
-
-  elogind is free software; you can redistribute it and/or modify it
-  under the terms of the GNU Lesser General Public License as published by
-  the Free Software Foundation; either version 2.1 of the License, or
-  (at your option) any later version.
-
-  elogind is distributed in the hope that it will be useful, but
-  WITHOUT ANY WARRANTY; without even the implied warranty of
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-  Lesser General Public License for more details.
-
-  You should have received a copy of the GNU Lesser General Public License
-  along with elogind; If not, see <http://www.gnu.org/licenses/>.
+  SPDX-License-Identifier: LGPL-2.1+
 -->
 
 <refentry id="sd_event_add_io" xmlns:xi="http://www.w3.org/2001/XInclude">
@@ -49,6 +34,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>
 
         <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>
 
     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>
     <title>See Also</title>
 
     <para>
+      <!-- 0 /// elogind is in section 8
+      <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>sd_event_add_inotify</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      --><!-- else -->
       <citerefentry><refentrytitle>elogind</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
+      <!-- // 0 -->
       <citerefentry><refentrytitle>sd-event</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
       <citerefentry><refentrytitle>sd_event_new</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
       <citerefentry><refentrytitle>sd_event_now</refentrytitle><manvolnum>3</manvolnum></citerefentry>,