Imported Upstream version 2.50.2
[platform/upstream/glib.git] / docs / reference / gio / html / GUnixFDList.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <html>
3 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5 <title>GUnixFDList: GIO Reference Manual</title>
6 <meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
7 <link rel="home" href="index.html" title="GIO Reference Manual">
8 <link rel="up" href="networking.html" title="Low-level network support">
9 <link rel="prev" href="GSocketControlMessage.html" title="GSocketControlMessage">
10 <link rel="next" href="GUnixFDMessage.html" title="GUnixFDMessage">
11 <meta name="generator" content="GTK-Doc V1.25.1 (XML mode)">
12 <link rel="stylesheet" href="style.css" type="text/css">
13 </head>
14 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
15 <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
16 <td width="100%" align="left" class="shortcuts">
17 <a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
18                   <a href="#GUnixFDList.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span> 
19                   <a href="#GUnixFDList.object-hierarchy" class="shortcut">Object Hierarchy</a></span>
20 </td>
21 <td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
22 <td><a accesskey="u" href="networking.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
23 <td><a accesskey="p" href="GSocketControlMessage.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
24 <td><a accesskey="n" href="GUnixFDMessage.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
25 </tr></table>
26 <div class="refentry">
27 <a name="GUnixFDList"></a><div class="titlepage"></div>
28 <div class="refnamediv"><table width="100%"><tr>
29 <td valign="top">
30 <h2><span class="refentrytitle"><a name="GUnixFDList.top_of_page"></a>GUnixFDList</span></h2>
31 <p>GUnixFDList — An object containing a set of UNIX file descriptors</p>
32 </td>
33 <td class="gallery_image" valign="top" align="right"></td>
34 </tr></table></div>
35 <div class="refsect1">
36 <a name="GUnixFDList.functions"></a><h2>Functions</h2>
37 <div class="informaltable"><table class="informaltable" width="100%" border="0">
38 <colgroup>
39 <col width="150px" class="functions_return">
40 <col class="functions_name">
41 </colgroup>
42 <tbody>
43 <tr>
44 <td class="function_type">
45 <a class="link" href="GUnixFDList.html" title="GUnixFDList"><span class="returnvalue">GUnixFDList</span></a> *
46 </td>
47 <td class="function_name">
48 <a class="link" href="GUnixFDList.html#g-unix-fd-list-new-from-array" title="g_unix_fd_list_new_from_array ()">g_unix_fd_list_new_from_array</a> <span class="c_punctuation">()</span>
49 </td>
50 </tr>
51 <tr>
52 <td class="function_type">
53 <a class="link" href="GUnixFDList.html" title="GUnixFDList"><span class="returnvalue">GUnixFDList</span></a> *
54 </td>
55 <td class="function_name">
56 <a class="link" href="GUnixFDList.html#g-unix-fd-list-new" title="g_unix_fd_list_new ()">g_unix_fd_list_new</a> <span class="c_punctuation">()</span>
57 </td>
58 </tr>
59 <tr>
60 <td class="function_type">
61 <a href="../glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>
62 </td>
63 <td class="function_name">
64 <a class="link" href="GUnixFDList.html#g-unix-fd-list-get-length" title="g_unix_fd_list_get_length ()">g_unix_fd_list_get_length</a> <span class="c_punctuation">()</span>
65 </td>
66 </tr>
67 <tr>
68 <td class="function_type">
69 <a href="../glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>
70 </td>
71 <td class="function_name">
72 <a class="link" href="GUnixFDList.html#g-unix-fd-list-get" title="g_unix_fd_list_get ()">g_unix_fd_list_get</a> <span class="c_punctuation">()</span>
73 </td>
74 </tr>
75 <tr>
76 <td class="function_type">const <a href="../glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a> *
77 </td>
78 <td class="function_name">
79 <a class="link" href="GUnixFDList.html#g-unix-fd-list-peek-fds" title="g_unix_fd_list_peek_fds ()">g_unix_fd_list_peek_fds</a> <span class="c_punctuation">()</span>
80 </td>
81 </tr>
82 <tr>
83 <td class="function_type">
84 <a href="../glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a> *
85 </td>
86 <td class="function_name">
87 <a class="link" href="GUnixFDList.html#g-unix-fd-list-steal-fds" title="g_unix_fd_list_steal_fds ()">g_unix_fd_list_steal_fds</a> <span class="c_punctuation">()</span>
88 </td>
89 </tr>
90 <tr>
91 <td class="function_type">
92 <a href="../glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>
93 </td>
94 <td class="function_name">
95 <a class="link" href="GUnixFDList.html#g-unix-fd-list-append" title="g_unix_fd_list_append ()">g_unix_fd_list_append</a> <span class="c_punctuation">()</span>
96 </td>
97 </tr>
98 </tbody>
99 </table></div>
100 </div>
101 <div class="refsect1">
102 <a name="GUnixFDList.other"></a><h2>Types and Values</h2>
103 <div class="informaltable"><table class="informaltable" width="100%" border="0">
104 <colgroup>
105 <col width="150px" class="name">
106 <col class="description">
107 </colgroup>
108 <tbody><tr>
109 <td class="datatype_keyword"> </td>
110 <td class="function_name"><a class="link" href="GUnixFDList.html#GUnixFDList-struct" title="GUnixFDList">GUnixFDList</a></td>
111 </tr></tbody>
112 </table></div>
113 </div>
114 <div class="refsect1">
115 <a name="GUnixFDList.object-hierarchy"></a><h2>Object Hierarchy</h2>
116 <pre class="screen">    <a href="../gobject-The-Base-Object-Type.html#GObject-struct">GObject</a>
117     <span class="lineart">╰──</span> GUnixFDList
118 </pre>
119 </div>
120 <div class="refsect1">
121 <a name="GUnixFDList.includes"></a><h2>Includes</h2>
122 <pre class="synopsis">#include &lt;gio/gunixfdlist.h&gt;
123 </pre>
124 </div>
125 <div class="refsect1">
126 <a name="GUnixFDList.description"></a><h2>Description</h2>
127 <p>A <a class="link" href="GUnixFDList.html" title="GUnixFDList"><span class="type">GUnixFDList</span></a> contains a list of file descriptors.  It owns the file
128 descriptors that it contains, closing them when finalized.</p>
129 <p>It may be wrapped in a <a class="link" href="GUnixFDMessage.html" title="GUnixFDMessage"><span class="type">GUnixFDMessage</span></a> and sent over a <a class="link" href="GSocket.html" title="GSocket"><span class="type">GSocket</span></a> in
130 the <code class="literal">G_SOCKET_ADDRESS_UNIX</code> family by using <a class="link" href="GSocket.html#g-socket-send-message" title="g_socket_send_message ()"><code class="function">g_socket_send_message()</code></a>
131 and received using <a class="link" href="GSocket.html#g-socket-receive-message" title="g_socket_receive_message ()"><code class="function">g_socket_receive_message()</code></a>.</p>
132 <p>Note that <code class="literal">&lt;gio/gunixfdlist.h&gt;</code> belongs to the UNIX-specific GIO
133 interfaces, thus you have to use the <code class="literal">gio-unix-2.0.pc</code> pkg-config
134 file when using it.</p>
135 </div>
136 <div class="refsect1">
137 <a name="GUnixFDList.functions_details"></a><h2>Functions</h2>
138 <div class="refsect2">
139 <a name="g-unix-fd-list-new-from-array"></a><h3>g_unix_fd_list_new_from_array ()</h3>
140 <pre class="programlisting"><a class="link" href="GUnixFDList.html" title="GUnixFDList"><span class="returnvalue">GUnixFDList</span></a> *
141 g_unix_fd_list_new_from_array (<em class="parameter"><code>const <a href="../glib-Basic-Types.html#gint"><span class="type">gint</span></a> *fds</code></em>,
142                                <em class="parameter"><code><a href="../glib-Basic-Types.html#gint"><span class="type">gint</span></a> n_fds</code></em>);</pre>
143 <p>Creates a new <a class="link" href="GUnixFDList.html" title="GUnixFDList"><span class="type">GUnixFDList</span></a> containing the file descriptors given in
144 <em class="parameter"><code>fds</code></em>
145 .  The file descriptors become the property of the new list and
146 may no longer be used by the caller.  The array itself is owned by
147 the caller.</p>
148 <p>Each file descriptor in the array should be set to close-on-exec.</p>
149 <p>If <em class="parameter"><code>n_fds</code></em>
150  is -1 then <em class="parameter"><code>fds</code></em>
151  must be terminated with -1.</p>
152 <div class="refsect3">
153 <a name="g-unix-fd-list-new-from-array.parameters"></a><h4>Parameters</h4>
154 <div class="informaltable"><table class="informaltable" width="100%" border="0">
155 <colgroup>
156 <col width="150px" class="parameters_name">
157 <col class="parameters_description">
158 <col width="200px" class="parameters_annotations">
159 </colgroup>
160 <tbody>
161 <tr>
162 <td class="parameter_name"><p>fds</p></td>
163 <td class="parameter_description"><p> the initial list of file descriptors. </p></td>
164 <td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=n_fds]</span></td>
165 </tr>
166 <tr>
167 <td class="parameter_name"><p>n_fds</p></td>
168 <td class="parameter_description"><p>the length of <span class="type">fds</span>, or -1</p></td>
169 <td class="parameter_annotations"> </td>
170 </tr>
171 </tbody>
172 </table></div>
173 </div>
174 <div class="refsect3">
175 <a name="g-unix-fd-list-new-from-array.returns"></a><h4>Returns</h4>
176 <p> a new <a class="link" href="GUnixFDList.html" title="GUnixFDList"><span class="type">GUnixFDList</span></a></p>
177 </div>
178 <p class="since">Since: <a class="link" href="api-index-2-24.html#api-index-2.24">2.24</a></p>
179 </div>
180 <hr>
181 <div class="refsect2">
182 <a name="g-unix-fd-list-new"></a><h3>g_unix_fd_list_new ()</h3>
183 <pre class="programlisting"><a class="link" href="GUnixFDList.html" title="GUnixFDList"><span class="returnvalue">GUnixFDList</span></a> *
184 g_unix_fd_list_new (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
185 <p>Creates a new <a class="link" href="GUnixFDList.html" title="GUnixFDList"><span class="type">GUnixFDList</span></a> containing no file descriptors.</p>
186 <div class="refsect3">
187 <a name="g-unix-fd-list-new.returns"></a><h4>Returns</h4>
188 <p> a new <a class="link" href="GUnixFDList.html" title="GUnixFDList"><span class="type">GUnixFDList</span></a></p>
189 </div>
190 <p class="since">Since: <a class="link" href="api-index-2-24.html#api-index-2.24">2.24</a></p>
191 </div>
192 <hr>
193 <div class="refsect2">
194 <a name="g-unix-fd-list-get-length"></a><h3>g_unix_fd_list_get_length ()</h3>
195 <pre class="programlisting"><a href="../glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>
196 g_unix_fd_list_get_length (<em class="parameter"><code><a class="link" href="GUnixFDList.html" title="GUnixFDList"><span class="type">GUnixFDList</span></a> *list</code></em>);</pre>
197 <p>Gets the length of <em class="parameter"><code>list</code></em>
198  (ie: the number of file descriptors
199 contained within).</p>
200 <div class="refsect3">
201 <a name="g-unix-fd-list-get-length.parameters"></a><h4>Parameters</h4>
202 <div class="informaltable"><table class="informaltable" width="100%" border="0">
203 <colgroup>
204 <col width="150px" class="parameters_name">
205 <col class="parameters_description">
206 <col width="200px" class="parameters_annotations">
207 </colgroup>
208 <tbody><tr>
209 <td class="parameter_name"><p>list</p></td>
210 <td class="parameter_description"><p>a <a class="link" href="GUnixFDList.html" title="GUnixFDList"><span class="type">GUnixFDList</span></a></p></td>
211 <td class="parameter_annotations"> </td>
212 </tr></tbody>
213 </table></div>
214 </div>
215 <div class="refsect3">
216 <a name="g-unix-fd-list-get-length.returns"></a><h4>Returns</h4>
217 <p> the length of <em class="parameter"><code>list</code></em>
218 </p>
219 </div>
220 <p class="since">Since: <a class="link" href="api-index-2-24.html#api-index-2.24">2.24</a></p>
221 </div>
222 <hr>
223 <div class="refsect2">
224 <a name="g-unix-fd-list-get"></a><h3>g_unix_fd_list_get ()</h3>
225 <pre class="programlisting"><a href="../glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>
226 g_unix_fd_list_get (<em class="parameter"><code><a class="link" href="GUnixFDList.html" title="GUnixFDList"><span class="type">GUnixFDList</span></a> *list</code></em>,
227                     <em class="parameter"><code><a href="../glib-Basic-Types.html#gint"><span class="type">gint</span></a> index_</code></em>,
228                     <em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
229 <p>Gets a file descriptor out of <em class="parameter"><code>list</code></em>
230 .</p>
231 <p><em class="parameter"><code>index_</code></em>
232  specifies the index of the file descriptor to get.  It is a
233 programmer error for <em class="parameter"><code>index_</code></em>
234  to be out of range; see
235 <a class="link" href="GUnixFDList.html#g-unix-fd-list-get-length" title="g_unix_fd_list_get_length ()"><code class="function">g_unix_fd_list_get_length()</code></a>.</p>
236 <p>The file descriptor is duplicated using <code class="function">dup()</code> and set as
237 close-on-exec before being returned.  You must call <code class="function">close()</code> on it
238 when you are done.</p>
239 <p>A possible cause of failure is exceeding the per-process or
240 system-wide file descriptor limit.</p>
241 <div class="refsect3">
242 <a name="g-unix-fd-list-get.parameters"></a><h4>Parameters</h4>
243 <div class="informaltable"><table class="informaltable" width="100%" border="0">
244 <colgroup>
245 <col width="150px" class="parameters_name">
246 <col class="parameters_description">
247 <col width="200px" class="parameters_annotations">
248 </colgroup>
249 <tbody>
250 <tr>
251 <td class="parameter_name"><p>list</p></td>
252 <td class="parameter_description"><p>a <a class="link" href="GUnixFDList.html" title="GUnixFDList"><span class="type">GUnixFDList</span></a></p></td>
253 <td class="parameter_annotations"> </td>
254 </tr>
255 <tr>
256 <td class="parameter_name"><p>index_</p></td>
257 <td class="parameter_description"><p>the index into the list</p></td>
258 <td class="parameter_annotations"> </td>
259 </tr>
260 <tr>
261 <td class="parameter_name"><p>error</p></td>
262 <td class="parameter_description"><p>a <a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> pointer</p></td>
263 <td class="parameter_annotations"> </td>
264 </tr>
265 </tbody>
266 </table></div>
267 </div>
268 <div class="refsect3">
269 <a name="g-unix-fd-list-get.returns"></a><h4>Returns</h4>
270 <p> the file descriptor, or -1 in case of error</p>
271 </div>
272 <p class="since">Since: <a class="link" href="api-index-2-24.html#api-index-2.24">2.24</a></p>
273 </div>
274 <hr>
275 <div class="refsect2">
276 <a name="g-unix-fd-list-peek-fds"></a><h3>g_unix_fd_list_peek_fds ()</h3>
277 <pre class="programlisting">const <a href="../glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a> *
278 g_unix_fd_list_peek_fds (<em class="parameter"><code><a class="link" href="GUnixFDList.html" title="GUnixFDList"><span class="type">GUnixFDList</span></a> *list</code></em>,
279                          <em class="parameter"><code><a href="../glib-Basic-Types.html#gint"><span class="type">gint</span></a> *length</code></em>);</pre>
280 <p>Returns the array of file descriptors that is contained in this
281 object.</p>
282 <p>After this call, the descriptors remain the property of <em class="parameter"><code>list</code></em>
283 .  The
284 caller must not close them and must not free the array.  The array is
285 valid only until <em class="parameter"><code>list</code></em>
286  is changed in any way.</p>
287 <p>If <em class="parameter"><code>length</code></em>
288  is non-<a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> then it is set to the number of file
289 descriptors in the returned array. The returned array is also
290 terminated with -1.</p>
291 <p>This function never returns <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. In case there are no file
292 descriptors contained in <em class="parameter"><code>list</code></em>
293 , an empty array is returned.</p>
294 <div class="refsect3">
295 <a name="g-unix-fd-list-peek-fds.parameters"></a><h4>Parameters</h4>
296 <div class="informaltable"><table class="informaltable" width="100%" border="0">
297 <colgroup>
298 <col width="150px" class="parameters_name">
299 <col class="parameters_description">
300 <col width="200px" class="parameters_annotations">
301 </colgroup>
302 <tbody>
303 <tr>
304 <td class="parameter_name"><p>list</p></td>
305 <td class="parameter_description"><p>a <a class="link" href="GUnixFDList.html" title="GUnixFDList"><span class="type">GUnixFDList</span></a></p></td>
306 <td class="parameter_annotations"> </td>
307 </tr>
308 <tr>
309 <td class="parameter_name"><p>length</p></td>
310 <td class="parameter_description"><p> pointer to the length of the returned
311 array, or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
312 <td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
313 </tr>
314 </tbody>
315 </table></div>
316 </div>
317 <div class="refsect3">
318 <a name="g-unix-fd-list-peek-fds.returns"></a><h4>Returns</h4>
319 <p> an array of file
320 descriptors. </p>
321 <p><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=length][<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
322 </div>
323 <p class="since">Since: <a class="link" href="api-index-2-24.html#api-index-2.24">2.24</a></p>
324 </div>
325 <hr>
326 <div class="refsect2">
327 <a name="g-unix-fd-list-steal-fds"></a><h3>g_unix_fd_list_steal_fds ()</h3>
328 <pre class="programlisting"><a href="../glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a> *
329 g_unix_fd_list_steal_fds (<em class="parameter"><code><a class="link" href="GUnixFDList.html" title="GUnixFDList"><span class="type">GUnixFDList</span></a> *list</code></em>,
330                           <em class="parameter"><code><a href="../glib-Basic-Types.html#gint"><span class="type">gint</span></a> *length</code></em>);</pre>
331 <p>Returns the array of file descriptors that is contained in this
332 object.</p>
333 <p>After this call, the descriptors are no longer contained in
334 <em class="parameter"><code>list</code></em>
335 . Further calls will return an empty list (unless more
336 descriptors have been added).</p>
337 <p>The return result of this function must be freed with <a href="../glib-Memory-Allocation.html#g-free"><code class="function">g_free()</code></a>.
338 The caller is also responsible for closing all of the file
339 descriptors.  The file descriptors in the array are set to
340 close-on-exec.</p>
341 <p>If <em class="parameter"><code>length</code></em>
342  is non-<a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> then it is set to the number of file
343 descriptors in the returned array. The returned array is also
344 terminated with -1.</p>
345 <p>This function never returns <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. In case there are no file
346 descriptors contained in <em class="parameter"><code>list</code></em>
347 , an empty array is returned.</p>
348 <div class="refsect3">
349 <a name="g-unix-fd-list-steal-fds.parameters"></a><h4>Parameters</h4>
350 <div class="informaltable"><table class="informaltable" width="100%" border="0">
351 <colgroup>
352 <col width="150px" class="parameters_name">
353 <col class="parameters_description">
354 <col width="200px" class="parameters_annotations">
355 </colgroup>
356 <tbody>
357 <tr>
358 <td class="parameter_name"><p>list</p></td>
359 <td class="parameter_description"><p>a <a class="link" href="GUnixFDList.html" title="GUnixFDList"><span class="type">GUnixFDList</span></a></p></td>
360 <td class="parameter_annotations"> </td>
361 </tr>
362 <tr>
363 <td class="parameter_name"><p>length</p></td>
364 <td class="parameter_description"><p> pointer to the length of the returned
365 array, or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
366 <td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
367 </tr>
368 </tbody>
369 </table></div>
370 </div>
371 <div class="refsect3">
372 <a name="g-unix-fd-list-steal-fds.returns"></a><h4>Returns</h4>
373 <p> an array of file
374 descriptors. </p>
375 <p><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=length][<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
376 </div>
377 <p class="since">Since: <a class="link" href="api-index-2-24.html#api-index-2.24">2.24</a></p>
378 </div>
379 <hr>
380 <div class="refsect2">
381 <a name="g-unix-fd-list-append"></a><h3>g_unix_fd_list_append ()</h3>
382 <pre class="programlisting"><a href="../glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>
383 g_unix_fd_list_append (<em class="parameter"><code><a class="link" href="GUnixFDList.html" title="GUnixFDList"><span class="type">GUnixFDList</span></a> *list</code></em>,
384                        <em class="parameter"><code><a href="../glib-Basic-Types.html#gint"><span class="type">gint</span></a> fd</code></em>,
385                        <em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
386 <p>Adds a file descriptor to <em class="parameter"><code>list</code></em>
387 .</p>
388 <p>The file descriptor is duplicated using <code class="function">dup()</code>. You keep your copy
389 of the descriptor and the copy contained in <em class="parameter"><code>list</code></em>
390  will be closed
391 when <em class="parameter"><code>list</code></em>
392  is finalized.</p>
393 <p>A possible cause of failure is exceeding the per-process or
394 system-wide file descriptor limit.</p>
395 <p>The index of the file descriptor in the list is returned.  If you use
396 this index with <a class="link" href="GUnixFDList.html#g-unix-fd-list-get" title="g_unix_fd_list_get ()"><code class="function">g_unix_fd_list_get()</code></a> then you will receive back a
397 duplicated copy of the same file descriptor.</p>
398 <div class="refsect3">
399 <a name="g-unix-fd-list-append.parameters"></a><h4>Parameters</h4>
400 <div class="informaltable"><table class="informaltable" width="100%" border="0">
401 <colgroup>
402 <col width="150px" class="parameters_name">
403 <col class="parameters_description">
404 <col width="200px" class="parameters_annotations">
405 </colgroup>
406 <tbody>
407 <tr>
408 <td class="parameter_name"><p>list</p></td>
409 <td class="parameter_description"><p>a <a class="link" href="GUnixFDList.html" title="GUnixFDList"><span class="type">GUnixFDList</span></a></p></td>
410 <td class="parameter_annotations"> </td>
411 </tr>
412 <tr>
413 <td class="parameter_name"><p>fd</p></td>
414 <td class="parameter_description"><p>a valid open file descriptor</p></td>
415 <td class="parameter_annotations"> </td>
416 </tr>
417 <tr>
418 <td class="parameter_name"><p>error</p></td>
419 <td class="parameter_description"><p>a <a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> pointer</p></td>
420 <td class="parameter_annotations"> </td>
421 </tr>
422 </tbody>
423 </table></div>
424 </div>
425 <div class="refsect3">
426 <a name="g-unix-fd-list-append.returns"></a><h4>Returns</h4>
427 <p> the index of the appended fd in case of success, else -1
428 (and <em class="parameter"><code>error</code></em>
429 is set)</p>
430 </div>
431 <p class="since">Since: <a class="link" href="api-index-2-24.html#api-index-2.24">2.24</a></p>
432 </div>
433 </div>
434 <div class="refsect1">
435 <a name="GUnixFDList.other_details"></a><h2>Types and Values</h2>
436 <div class="refsect2">
437 <a name="GUnixFDList-struct"></a><h3>GUnixFDList</h3>
438 <pre class="programlisting">typedef struct _GUnixFDList GUnixFDList;</pre>
439 <p><a class="link" href="GUnixFDList.html" title="GUnixFDList"><span class="type">GUnixFDList</span></a> is an opaque data structure and can only be accessed
440 using the following functions.</p>
441 </div>
442 </div>
443 <div class="refsect1">
444 <a name="GUnixFDList.see-also"></a><h2>See Also</h2>
445 <p><a class="link" href="GUnixFDMessage.html" title="GUnixFDMessage"><span class="type">GUnixFDMessage</span></a></p>
446 </div>
447 </div>
448 <div class="footer">
449 <hr>Generated by GTK-Doc V1.25.1</div>
450 </body>
451 </html>