Debian Codegraph @

po/es/man7/aio.7.po

raw
1 # Spanish translation of manpages
2 # This file is distributed under the same license as the manpages-l10n package.
3 # Copyright © of this file:
4 msgid ""
5 msgstr ""
6 "Project-Id-Version: manpages-l10n 4.11.0\n"
7 "POT-Creation-Date: 2026-06-05 06:17+0200\n"
8 "PO-Revision-Date: 2021-09-03 21:22+0200\n"
9 "Last-Translator: Automatically generated\n"
10 "Language-Team: Spanish <[email protected]>\n"
11 "Language: es\n"
12 "MIME-Version: 1.0\n"
13 "Content-Type: text/plain; charset=UTF-8\n"
14 "Content-Transfer-Encoding: 8bit\n"
15 "Plural-Forms: nplurals=2; plural=(n != 1);\n"
16
17 #. type: TH
18 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
19 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
20 #, no-wrap
21 msgid "AIO"
22 msgstr ""
23
24 #. type: TH
25 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
26 #: opensuse-tumbleweed
27 #, no-wrap
28 msgid "2026-02-08"
29 msgstr "8 Febrero 2026"
30
31 #. type: TH
32 #: archlinux debian-unstable
33 #, fuzzy, no-wrap
34 #| msgid "Linux man-pages 6.17"
35 msgid "Linux man-pages 6.18"
36 msgstr "Páginas de Manual de Linux 6.17"
37
38 #. type: SH
39 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
40 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
41 #, no-wrap
42 msgid "NAME"
43 msgstr "NOMBRE"
44
45 #. type: Plain text
46 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
47 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
48 msgid "aio - POSIX asynchronous I/O overview"
49 msgstr ""
50
51 #. type: SH
52 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
53 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
54 #, no-wrap
55 msgid "DESCRIPTION"
56 msgstr "DESCRIPCIÓN"
57
58 #. type: Plain text
59 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
60 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
61 msgid ""
62 "The POSIX asynchronous I/O (AIO) interface allows applications to initiate "
63 "one or more I/O operations that are performed asynchronously (i.e., in the "
64 "background). The application can elect to be notified of completion of the "
65 "I/O operation in a variety of ways: by delivery of a signal, by "
66 "instantiation of a thread, or no notification at all."
67 msgstr ""
68
69 #. type: Plain text
70 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
71 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
72 msgid "The POSIX AIO interface consists of the following functions:"
73 msgstr ""
74
75 #. type: TP
76 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
77 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
78 #, no-wrap
79 msgid "B<aio_read>(3)"
80 msgstr ""
81
82 #. type: Plain text
83 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
84 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
85 msgid "Enqueue a read request. This is the asynchronous analog of B<read>(2)."
86 msgstr ""
87
88 #. type: TP
89 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
90 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
91 #, no-wrap
92 msgid "B<aio_write>(3)"
93 msgstr ""
94
95 #. type: Plain text
96 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
97 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
98 msgid ""
99 "Enqueue a write request. This is the asynchronous analog of B<write>(2)."
100 msgstr ""
101
102 #. type: TP
103 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
104 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
105 #, no-wrap
106 msgid "B<aio_fsync>(3)"
107 msgstr ""
108
109 #. type: Plain text
110 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
111 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
112 msgid ""
113 "Enqueue a sync request for the I/O operations on a file descriptor. This is "
114 "the asynchronous analog of B<fsync>(2) and B<fdatasync>(2)."
115 msgstr ""
116
117 #. type: TP
118 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
119 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
120 #, no-wrap
121 msgid "B<aio_error>(3)"
122 msgstr ""
123
124 #. type: Plain text
125 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
126 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
127 msgid "Obtain the error status of an enqueued I/O request."
128 msgstr ""
129
130 #. type: TP
131 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
132 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
133 #, no-wrap
134 msgid "B<aio_return>(3)"
135 msgstr ""
136
137 #. type: Plain text
138 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
139 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
140 msgid "Obtain the return status of a completed I/O request."
141 msgstr ""
142
143 #. type: TP
144 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
145 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
146 #, no-wrap
147 msgid "B<aio_suspend>(3)"
148 msgstr ""
149
150 #. type: Plain text
151 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
152 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
153 msgid ""
154 "Suspend the caller until one or more of a specified set of I/O requests "
155 "completes."
156 msgstr ""
157
158 #. type: TP
159 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
160 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
161 #, no-wrap
162 msgid "B<aio_cancel>(3)"
163 msgstr ""
164
165 #. type: Plain text
166 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
167 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
168 msgid ""
169 "Attempt to cancel outstanding I/O requests on a specified file descriptor."
170 msgstr ""
171
172 #. type: TP
173 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
174 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
175 #, no-wrap
176 msgid "B<lio_listio>(3)"
177 msgstr ""
178
179 #. type: Plain text
180 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
181 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
182 msgid "Enqueue multiple I/O requests using a single function call."
183 msgstr ""
184
185 #. type: Plain text
186 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
187 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
188 msgid ""
189 "The I<aiocb> (\"asynchronous I/O control block\") structure defines "
190 "parameters that control an I/O operation. An argument of this type is "
191 "employed with all of the functions listed above. This structure has the "
192 "following form:"
193 msgstr ""
194
195 #. type: Plain text
196 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
197 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
198 #, no-wrap
199 msgid ""
200 "#include E<lt>aiocb.hE<gt>\n"
201 "\\&\n"
202 "struct aiocb {\n"
203 " /* The order of these fields is implementation-dependent */\n"
204 "\\&\n"
205 " int aio_fildes; /* File descriptor */\n"
206 " off_t aio_offset; /* File offset */\n"
207 " volatile void *aio_buf; /* Location of buffer */\n"
208 " size_t aio_nbytes; /* Length of transfer */\n"
209 " int aio_reqprio; /* Request priority */\n"
210 " struct sigevent aio_sigevent; /* Notification method */\n"
211 " int aio_lio_opcode; /* Operation to be performed;\n"
212 " lio_listio() only */\n"
213 "\\&\n"
214 " /* Various implementation-internal fields not shown */\n"
215 "};\n"
216 "\\&\n"
217 "/* Operation codes for \\[aq]aio_lio_opcode\\[aq]: */\n"
218 "\\&\n"
219 "enum { LIO_READ, LIO_WRITE, LIO_NOP };\n"
220 msgstr ""
221
222 #. type: Plain text
223 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
224 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
225 msgid "The fields of this structure are as follows:"
226 msgstr ""
227
228 #. type: TP
229 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
230 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
231 #, no-wrap
232 msgid "I<aio_fildes>"
233 msgstr ""
234
235 #. type: Plain text
236 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
237 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
238 msgid "The file descriptor on which the I/O operation is to be performed."
239 msgstr ""
240
241 #. type: TP
242 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
243 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
244 #, no-wrap
245 msgid "I<aio_offset>"
246 msgstr ""
247
248 #. type: Plain text
249 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
250 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
251 msgid "This is the file offset at which the I/O operation is to be performed."
252 msgstr ""
253
254 #. type: TP
255 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
256 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
257 #, no-wrap
258 msgid "I<aio_buf>"
259 msgstr ""
260
261 #. type: Plain text
262 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
263 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
264 msgid "This is the buffer used to transfer data for a read or write operation."
265 msgstr ""
266
267 #. type: TP
268 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
269 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
270 #, no-wrap
271 msgid "I<aio_nbytes>"
272 msgstr ""
273
274 #. type: Plain text
275 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
276 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
277 msgid "This is the size of the buffer pointed to by I<aio_buf>."
278 msgstr ""
279
280 #. type: TP
281 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
282 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
283 #, no-wrap
284 msgid "I<aio_reqprio>"
285 msgstr ""
286
287 #. type: Plain text
288 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
289 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
290 msgid ""
291 "This field specifies a value that is subtracted from the calling thread's "
292 "real-time priority in order to determine the priority for execution of this "
293 "I/O request (see B<pthread_setschedparam>(3)). The specified value must be "
294 "between 0 and the value returned by I<sysconf(_SC_AIO_PRIO_DELTA_MAX)>. "
295 "This field is ignored for file synchronization operations."
296 msgstr ""
297
298 #. type: TP
299 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
300 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
301 #, no-wrap
302 msgid "I<aio_sigevent>"
303 msgstr ""
304
305 #. type: Plain text
306 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
307 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
308 msgid ""
309 "This field is a structure that specifies how the caller is to be notified "
310 "when the asynchronous I/O operation completes. Possible values for "
311 "I<aio_sigevent.sigev_notify> are B<SIGEV_NONE>, B<SIGEV_SIGNAL>, and "
312 "B<SIGEV_THREAD>. See B<sigevent>(3type) for further details."
313 msgstr ""
314
315 #. type: TP
316 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
317 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
318 #, no-wrap
319 msgid "I<aio_lio_opcode>"
320 msgstr ""
321
322 #. type: Plain text
323 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
324 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
325 msgid "The type of operation to be performed; used only for B<lio_listio>(3)."
326 msgstr ""
327
328 #. type: Plain text
329 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
330 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
331 msgid ""
332 "In addition to the standard functions listed above, the GNU C library "
333 "provides the following extension to the POSIX AIO API:"
334 msgstr ""
335
336 #. type: TP
337 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
338 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
339 #, no-wrap
340 msgid "B<aio_init>(3)"
341 msgstr ""
342
343 #. type: Plain text
344 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
345 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
346 msgid ""
347 "Set parameters for tuning the behavior of the glibc POSIX AIO implementation."
348 msgstr ""
349
350 #. type: SH
351 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
352 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
353 #, no-wrap
354 msgid "ERRORS"
355 msgstr "ERRORES"
356
357 #. type: TP
358 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
359 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
360 #, no-wrap
361 msgid "B<EINVAL>"
362 msgstr "B<EINVAL>"
363
364 #. type: Plain text
365 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
366 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
367 msgid ""
368 "The I<aio_reqprio> field of the I<aiocb> structure was less than 0, or was "
369 "greater than the limit returned by the call "
370 "I<sysconf(_SC_AIO_PRIO_DELTA_MAX)>."
371 msgstr ""
372
373 #. type: SH
374 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
375 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
376 #, no-wrap
377 msgid "STANDARDS"
378 msgstr "ESTÁNDARES"
379
380 #. type: Plain text
381 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
382 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
383 msgid "POSIX.1-2008."
384 msgstr "POSIX.1-2008."
385
386 #. type: SH
387 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
388 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
389 #, no-wrap
390 msgid "HISTORY"
391 msgstr "HISTORIAL"
392
393 #. type: Plain text
394 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
395 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
396 #, fuzzy
397 #| msgid "POSIX.1-2001."
398 msgid "POSIX.1-2001. glibc 2.1."
399 msgstr "POSIX.1-2001."
400
401 #. type: SH
402 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
403 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
404 #, no-wrap
405 msgid "NOTES"
406 msgstr "NOTAS"
407
408 #. type: Plain text
409 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
410 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
411 msgid ""
412 "It is a good idea to zero out the control block buffer before use (see "
413 "B<memset>(3)). The control block buffer and the buffer pointed to by "
414 "I<aio_buf> must not be changed while the I/O operation is in progress. "
415 "These buffers must remain valid until the I/O operation completes."
416 msgstr ""
417
418 #. type: Plain text
419 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
420 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
421 msgid ""
422 "Simultaneous asynchronous read or write operations using the same I<aiocb> "
423 "structure yield undefined results."
424 msgstr ""
425
426 #. http://lse.sourceforge.net/io/aio.html
427 #. http://lse.sourceforge.net/io/aionotes.txt
428 #. http://lwn.net/Articles/148755/
429 #. type: Plain text
430 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
431 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
432 msgid ""
433 "The current Linux POSIX AIO implementation is provided in user space by "
434 "glibc. This has a number of limitations, most notably that maintaining "
435 "multiple threads to perform I/O operations is expensive and scales poorly. "
436 "Work has been in progress for some time on a kernel state-machine-based "
437 "implementation of asynchronous I/O (see B<io_submit>(2), B<io_setup>(2), "
438 "B<io_cancel>(2), B<io_destroy>(2), B<io_getevents>(2)), but this "
439 "implementation hasn't yet matured to the point where the POSIX AIO "
440 "implementation can be completely reimplemented using the kernel system calls."
441 msgstr ""
442
443 #. type: SH
444 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
445 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
446 #, no-wrap
447 msgid "EXAMPLES"
448 msgstr "EJEMPLOS"
449
450 #. type: Plain text
451 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
452 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
453 msgid ""
454 "The program below opens each of the files named in its command-line "
455 "arguments and queues a request on the resulting file descriptor using "
456 "B<aio_read>(3). The program then loops, periodically monitoring each of the "
457 "I/O operations that is still in progress using B<aio_error>(3). Each of the "
458 "I/O requests is set up to provide notification by delivery of a signal. "
459 "After all I/O requests have completed, the program retrieves their status "
460 "using B<aio_return>(3)."
461 msgstr ""
462
463 #. type: Plain text
464 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
465 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
466 msgid ""
467 "The B<SIGQUIT> signal (generated by typing control-\\[rs]) causes the "
468 "program to request cancelation of each of the outstanding requests using "
469 "B<aio_cancel>(3)."
470 msgstr ""
471
472 #. type: Plain text
473 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
474 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
475 msgid ""
476 "Here is an example of what we might see when running this program. In this "
477 "example, the program queues two requests to standard input, and these are "
478 "satisfied by two lines of input containing \"abc\" and \"x\"."
479 msgstr ""
480
481 #. type: Plain text
482 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
483 #: opensuse-tumbleweed
484 #, no-wrap
485 msgid ""
486 "$B< ./a.out /dev/stdin /dev/stdin>;\n"
487 "opened /dev/stdin on descriptor 3\n"
488 "opened /dev/stdin on descriptor 4\n"
489 "aio_error():\n"
490 " for request 0 (descriptor 3): In progress\n"
491 " for request 1 (descriptor 4): In progress\n"
492 "B<abc>\n"
493 "I/O completion signal received\n"
494 "aio_error():\n"
495 " for request 0 (descriptor 3): I/O succeeded\n"
496 " for request 1 (descriptor 4): In progress\n"
497 "aio_error():\n"
498 " for request 1 (descriptor 4): In progress\n"
499 "B<x>\n"
500 "I/O completion signal received\n"
501 "aio_error():\n"
502 " for request 1 (descriptor 4): I/O succeeded\n"
503 "All I/O requests completed\n"
504 "aio_return():\n"
505 " for request 0 (descriptor 3): 4\n"
506 " for request 1 (descriptor 4): 2\n"
507 msgstr ""
508
509 #. type: SS
510 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
511 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
512 #, no-wrap
513 msgid "Program source"
514 msgstr "Código fuente"
515
516 #. type: Plain text
517 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
518 #: opensuse-tumbleweed
519 #, no-wrap
520 msgid ""
521 "#include E<lt>err.hE<gt>\n"
522 "#include E<lt>fcntl.hE<gt>\n"
523 "#include E<lt>stdlib.hE<gt>\n"
524 "#include E<lt>unistd.hE<gt>\n"
525 "#include E<lt>stdio.hE<gt>\n"
526 "#include E<lt>errno.hE<gt>\n"
527 "#include E<lt>aio.hE<gt>\n"
528 "#include E<lt>signal.hE<gt>\n"
529 "\\&\n"
530 "#define BUF_SIZE 20 /* Size of buffers for read operations */\n"
531 "\\&\n"
532 "struct ioRequest { /* Application-defined structure for tracking\n"
533 " I/O requests */\n"
534 " int reqNum;\n"
535 " int status;\n"
536 " struct aiocb *aiocbp;\n"
537 "};\n"
538 "\\&\n"
539 "static volatile sig_atomic_t gotSIGQUIT = 0;\n"
540 " /* On delivery of SIGQUIT, we attempt to\n"
541 " cancel all outstanding I/O requests */\n"
542 "\\&\n"
543 "static void /* Handler for SIGQUIT */\n"
544 "quitHandler(int sig)\n"
545 "{\n"
546 " gotSIGQUIT = 1;\n"
547 "}\n"
548 "\\&\n"
549 "#define IO_SIGNAL SIGUSR1 /* Signal used to notify I/O completion */\n"
550 "\\&\n"
551 "static void /* Handler for I/O completion signal */\n"
552 "aioSigHandler(int sig, siginfo_t *si, void *ucontext)\n"
553 "{\n"
554 " if (si-E<gt>si_code == SI_ASYNCIO) {\n"
555 " write(STDOUT_FILENO, \"I/O completion signal received\\[rs]n\", 31);\n"
556 "\\&\n"
557 " /* The corresponding ioRequest structure would be available as\n"
558 " struct ioRequest *ioReq = si-E<gt>si_value.sival_ptr;\n"
559 " and the file descriptor would then be available via\n"
560 " ioReq-E<gt>aiocbp-E<gt>aio_fildes */\n"
561 " }\n"
562 "}\n"
563 "\\&\n"
564 "int\n"
565 "main(int argc, char *argv[])\n"
566 "{\n"
567 " struct sigaction sa;\n"
568 " int s;\n"
569 " int numReqs; /* Total number of queued I/O requests */\n"
570 " int openReqs; /* Number of I/O requests still in progress */\n"
571 "\\&\n"
572 " if (argc E<lt> 2) {\n"
573 " fprintf(stderr, \"Usage: %s E<lt>pathnameE<gt> E<lt>pathnameE<gt>...\\[rs]n\",\n"
574 " argv[0]);\n"
575 " exit(EXIT_FAILURE);\n"
576 " }\n"
577 "\\&\n"
578 " numReqs = argc - 1;\n"
579 "\\&\n"
580 " /* Allocate our arrays. */\n"
581 "\\&\n"
582 " struct ioRequest *ioList = calloc(numReqs, sizeof(*ioList));\n"
583 " if (ioList == NULL)\n"
584 " err(EXIT_FAILURE, \"calloc\");\n"
585 "\\&\n"
586 " struct aiocb *aiocbList = calloc(numReqs, sizeof(*aiocbList));\n"
587 " if (aiocbList == NULL)\n"
588 " err(EXIT_FAILURE, \"calloc\");\n"
589 "\\&\n"
590 " /* Establish handlers for SIGQUIT and the I/O completion signal. */\n"
591 "\\&\n"
592 " sa.sa_flags = SA_RESTART;\n"
593 " sigemptyset(&sa.sa_mask);\n"
594 "\\&\n"
595 " sa.sa_handler = quitHandler;\n"
596 " if (sigaction(SIGQUIT, &sa, NULL) == -1)\n"
597 " err(EXIT_FAILURE, \"sigaction\");\n"
598 "\\&\n"
599 " sa.sa_flags = SA_RESTART | SA_SIGINFO;\n"
600 " sa.sa_sigaction = aioSigHandler;\n"
601 " if (sigaction(IO_SIGNAL, &sa, NULL) == -1)\n"
602 " err(EXIT_FAILURE, \"sigaction\");\n"
603 "\\&\n"
604 " /* Open each file specified on the command line, and queue\n"
605 " a read request on the resulting file descriptor. */\n"
606 "\\&\n"
607 " for (size_t j = 0; j E<lt> numReqs; j++) {\n"
608 " ioList[j].reqNum = j;\n"
609 " ioList[j].status = EINPROGRESS;\n"
610 " ioList[j].aiocbp = &aiocbList[j];\n"
611 "\\&\n"
612 " ioList[j].aiocbp-E<gt>aio_fildes = open(argv[j + 1], O_RDONLY);\n"
613 " if (ioList[j].aiocbp-E<gt>aio_fildes == -1)\n"
614 " err(EXIT_FAILURE, \"open\");\n"
615 " printf(\"opened %s on descriptor %d\\[rs]n\", argv[j + 1],\n"
616 " ioList[j].aiocbp-E<gt>aio_fildes);\n"
617 "\\&\n"
618 " ioList[j].aiocbp-E<gt>aio_buf = malloc(BUF_SIZE);\n"
619 " if (ioList[j].aiocbp-E<gt>aio_buf == NULL)\n"
620 " err(EXIT_FAILURE, \"malloc\");\n"
621 "\\&\n"
622 " ioList[j].aiocbp-E<gt>aio_nbytes = BUF_SIZE;\n"
623 " ioList[j].aiocbp-E<gt>aio_reqprio = 0;\n"
624 " ioList[j].aiocbp-E<gt>aio_offset = 0;\n"
625 " ioList[j].aiocbp-E<gt>aio_sigevent.sigev_notify = SIGEV_SIGNAL;\n"
626 " ioList[j].aiocbp-E<gt>aio_sigevent.sigev_signo = IO_SIGNAL;\n"
627 " ioList[j].aiocbp-E<gt>aio_sigevent.sigev_value.sival_ptr =\n"
628 " &ioList[j];\n"
629 "\\&\n"
630 " s = aio_read(ioList[j].aiocbp);\n"
631 " if (s == -1)\n"
632 " err(EXIT_FAILURE, \"aio_read\");\n"
633 " }\n"
634 "\\&\n"
635 " openReqs = numReqs;\n"
636 "\\&\n"
637 " /* Loop, monitoring status of I/O requests. */\n"
638 "\\&\n"
639 " while (openReqs E<gt> 0) {\n"
640 " sleep(3); /* Delay between each monitoring step */\n"
641 "\\&\n"
642 " if (gotSIGQUIT) {\n"
643 "\\&\n"
644 " /* On receipt of SIGQUIT, attempt to cancel each of the\n"
645 " outstanding I/O requests, and display status returned\n"
646 " from the cancelation requests. */\n"
647 "\\&\n"
648 " printf(\"got SIGQUIT; canceling I/O requests: \\[rs]n\");\n"
649 "\\&\n"
650 " for (size_t j = 0; j E<lt> numReqs; j++) {\n"
651 " if (ioList[j].status == EINPROGRESS) {\n"
652 " printf(\" Request %zu on descriptor %d:\", j,\n"
653 " ioList[j].aiocbp-E<gt>aio_fildes);\n"
654 " s = aio_cancel(ioList[j].aiocbp-E<gt>aio_fildes,\n"
655 " ioList[j].aiocbp);\n"
656 " if (s == AIO_CANCELED)\n"
657 " printf(\"I/O canceled\\[rs]n\");\n"
658 " else if (s == AIO_NOTCANCELED)\n"
659 " printf(\"I/O not canceled\\[rs]n\");\n"
660 " else if (s == AIO_ALLDONE)\n"
661 " printf(\"I/O all done\\[rs]n\");\n"
662 " else\n"
663 " perror(\"aio_cancel\");\n"
664 " }\n"
665 " }\n"
666 "\\&\n"
667 " gotSIGQUIT = 0;\n"
668 " }\n"
669 "\\&\n"
670 " /* Check the status of each I/O request that is still\n"
671 " in progress. */\n"
672 "\\&\n"
673 " printf(\"aio_error():\\[rs]n\");\n"
674 " for (size_t j = 0; j E<lt> numReqs; j++) {\n"
675 " if (ioList[j].status == EINPROGRESS) {\n"
676 " printf(\" for request %zu (descriptor %d): \",\n"
677 " j, ioList[j].aiocbp-E<gt>aio_fildes);\n"
678 " ioList[j].status = aio_error(ioList[j].aiocbp);\n"
679 "\\&\n"
680 " switch (ioList[j].status) {\n"
681 " case 0:\n"
682 " printf(\"I/O succeeded\\[rs]n\");\n"
683 " break;\n"
684 " case EINPROGRESS:\n"
685 " printf(\"In progress\\[rs]n\");\n"
686 " break;\n"
687 " case ECANCELED:\n"
688 " printf(\"Canceled\\[rs]n\");\n"
689 " break;\n"
690 " default:\n"
691 " perror(\"aio_error\");\n"
692 " break;\n"
693 " }\n"
694 "\\&\n"
695 " if (ioList[j].status != EINPROGRESS)\n"
696 " openReqs--;\n"
697 " }\n"
698 " }\n"
699 " }\n"
700 "\\&\n"
701 " printf(\"All I/O requests completed\\[rs]n\");\n"
702 "\\&\n"
703 " /* Check status return of all I/O requests. */\n"
704 "\\&\n"
705 " printf(\"aio_return():\\[rs]n\");\n"
706 " for (size_t j = 0; j E<lt> numReqs; j++) {\n"
707 " ssize_t s;\n"
708 "\\&\n"
709 " s = aio_return(ioList[j].aiocbp);\n"
710 " printf(\" for request %zu (descriptor %d): %zd\\[rs]n\",\n"
711 " j, ioList[j].aiocbp-E<gt>aio_fildes, s);\n"
712 " }\n"
713 "\\&\n"
714 " exit(EXIT_SUCCESS);\n"
715 "}\n"
716 msgstr ""
717
718 #. type: SH
719 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
720 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
721 #, no-wrap
722 msgid "SEE ALSO"
723 msgstr "VÉASE TAMBIÉN"
724
725 #. type: Plain text
726 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
727 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
728 msgid ""
729 "B<io_cancel>(2), B<io_destroy>(2), B<io_getevents>(2), B<io_setup>(2), "
730 "B<io_submit>(2), B<aio_cancel>(3), B<aio_error>(3), B<aio_init>(3), "
731 "B<aio_read>(3), B<aio_return>(3), B<aio_write>(3), B<lio_listio>(3)"
732 msgstr ""
733
734 #. type: Plain text
735 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
736 #: opensuse-tumbleweed
737 msgid ""
738 "\"Asynchronous I/O Support in Linux 2.5\", Bhattacharya, Pratt, Pulavarty, "
739 "and Morgan, Proceedings of the Linux Symposium, 2003, E<.UR https:\\://"
740 "www.kernel.org/doc/ols/2003/ols2003-pages-351-366.pdf> E<.UE>"
741 msgstr ""
742
743 #. type: TH
744 #: debian-trixie fedora-44 fedora-rawhide
745 #, no-wrap
746 msgid "2024-06-15"
747 msgstr "15 Junio 2024"
748
749 #. type: TH
750 #: debian-trixie
751 #, no-wrap
752 msgid "Linux man-pages 6.9.1"
753 msgstr "Páginas de Manual de Linux 6.9.1"
754
755 #. type: Plain text
756 #: debian-trixie fedora-44 fedora-rawhide
757 #, no-wrap
758 msgid ""
759 "$ B<./a.out /dev/stdin /dev/stdin>\n"
760 "opened /dev/stdin on descriptor 3\n"
761 "opened /dev/stdin on descriptor 4\n"
762 "aio_error():\n"
763 " for request 0 (descriptor 3): In progress\n"
764 " for request 1 (descriptor 4): In progress\n"
765 "B<abc>\n"
766 "I/O completion signal received\n"
767 "aio_error():\n"
768 " for request 0 (descriptor 3): I/O succeeded\n"
769 " for request 1 (descriptor 4): In progress\n"
770 "aio_error():\n"
771 " for request 1 (descriptor 4): In progress\n"
772 "B<x>\n"
773 "I/O completion signal received\n"
774 "aio_error():\n"
775 " for request 1 (descriptor 4): I/O succeeded\n"
776 "All I/O requests completed\n"
777 "aio_return():\n"
778 " for request 0 (descriptor 3): 4\n"
779 " for request 1 (descriptor 4): 2\n"
780 msgstr ""
781
782 #. type: Plain text
783 #: debian-trixie fedora-44 fedora-rawhide
784 #, no-wrap
785 msgid ""
786 "#include E<lt>fcntl.hE<gt>\n"
787 "#include E<lt>stdlib.hE<gt>\n"
788 "#include E<lt>unistd.hE<gt>\n"
789 "#include E<lt>stdio.hE<gt>\n"
790 "#include E<lt>errno.hE<gt>\n"
791 "#include E<lt>aio.hE<gt>\n"
792 "#include E<lt>signal.hE<gt>\n"
793 "\\&\n"
794 "#define BUF_SIZE 20 /* Size of buffers for read operations */\n"
795 "\\&\n"
796 "#define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
797 "\\&\n"
798 "struct ioRequest { /* Application-defined structure for tracking\n"
799 " I/O requests */\n"
800 " int reqNum;\n"
801 " int status;\n"
802 " struct aiocb *aiocbp;\n"
803 "};\n"
804 "\\&\n"
805 "static volatile sig_atomic_t gotSIGQUIT = 0;\n"
806 " /* On delivery of SIGQUIT, we attempt to\n"
807 " cancel all outstanding I/O requests */\n"
808 "\\&\n"
809 "static void /* Handler for SIGQUIT */\n"
810 "quitHandler(int sig)\n"
811 "{\n"
812 " gotSIGQUIT = 1;\n"
813 "}\n"
814 "\\&\n"
815 "#define IO_SIGNAL SIGUSR1 /* Signal used to notify I/O completion */\n"
816 "\\&\n"
817 "static void /* Handler for I/O completion signal */\n"
818 "aioSigHandler(int sig, siginfo_t *si, void *ucontext)\n"
819 "{\n"
820 " if (si-E<gt>si_code == SI_ASYNCIO) {\n"
821 " write(STDOUT_FILENO, \"I/O completion signal received\\[rs]n\", 31);\n"
822 "\\&\n"
823 " /* The corresponding ioRequest structure would be available as\n"
824 " struct ioRequest *ioReq = si-E<gt>si_value.sival_ptr;\n"
825 " and the file descriptor would then be available via\n"
826 " ioReq-E<gt>aiocbp-E<gt>aio_fildes */\n"
827 " }\n"
828 "}\n"
829 "\\&\n"
830 "int\n"
831 "main(int argc, char *argv[])\n"
832 "{\n"
833 " struct sigaction sa;\n"
834 " int s;\n"
835 " int numReqs; /* Total number of queued I/O requests */\n"
836 " int openReqs; /* Number of I/O requests still in progress */\n"
837 "\\&\n"
838 " if (argc E<lt> 2) {\n"
839 " fprintf(stderr, \"Usage: %s E<lt>pathnameE<gt> E<lt>pathnameE<gt>...\\[rs]n\",\n"
840 " argv[0]);\n"
841 " exit(EXIT_FAILURE);\n"
842 " }\n"
843 "\\&\n"
844 " numReqs = argc - 1;\n"
845 "\\&\n"
846 " /* Allocate our arrays. */\n"
847 "\\&\n"
848 " struct ioRequest *ioList = calloc(numReqs, sizeof(*ioList));\n"
849 " if (ioList == NULL)\n"
850 " errExit(\"calloc\");\n"
851 "\\&\n"
852 " struct aiocb *aiocbList = calloc(numReqs, sizeof(*aiocbList));\n"
853 " if (aiocbList == NULL)\n"
854 " errExit(\"calloc\");\n"
855 "\\&\n"
856 " /* Establish handlers for SIGQUIT and the I/O completion signal. */\n"
857 "\\&\n"
858 " sa.sa_flags = SA_RESTART;\n"
859 " sigemptyset(&sa.sa_mask);\n"
860 "\\&\n"
861 " sa.sa_handler = quitHandler;\n"
862 " if (sigaction(SIGQUIT, &sa, NULL) == -1)\n"
863 " errExit(\"sigaction\");\n"
864 "\\&\n"
865 " sa.sa_flags = SA_RESTART | SA_SIGINFO;\n"
866 " sa.sa_sigaction = aioSigHandler;\n"
867 " if (sigaction(IO_SIGNAL, &sa, NULL) == -1)\n"
868 " errExit(\"sigaction\");\n"
869 "\\&\n"
870 " /* Open each file specified on the command line, and queue\n"
871 " a read request on the resulting file descriptor. */\n"
872 "\\&\n"
873 " for (size_t j = 0; j E<lt> numReqs; j++) {\n"
874 " ioList[j].reqNum = j;\n"
875 " ioList[j].status = EINPROGRESS;\n"
876 " ioList[j].aiocbp = &aiocbList[j];\n"
877 "\\&\n"
878 " ioList[j].aiocbp-E<gt>aio_fildes = open(argv[j + 1], O_RDONLY);\n"
879 " if (ioList[j].aiocbp-E<gt>aio_fildes == -1)\n"
880 " errExit(\"open\");\n"
881 " printf(\"opened %s on descriptor %d\\[rs]n\", argv[j + 1],\n"
882 " ioList[j].aiocbp-E<gt>aio_fildes);\n"
883 "\\&\n"
884 " ioList[j].aiocbp-E<gt>aio_buf = malloc(BUF_SIZE);\n"
885 " if (ioList[j].aiocbp-E<gt>aio_buf == NULL)\n"
886 " errExit(\"malloc\");\n"
887 "\\&\n"
888 " ioList[j].aiocbp-E<gt>aio_nbytes = BUF_SIZE;\n"
889 " ioList[j].aiocbp-E<gt>aio_reqprio = 0;\n"
890 " ioList[j].aiocbp-E<gt>aio_offset = 0;\n"
891 " ioList[j].aiocbp-E<gt>aio_sigevent.sigev_notify = SIGEV_SIGNAL;\n"
892 " ioList[j].aiocbp-E<gt>aio_sigevent.sigev_signo = IO_SIGNAL;\n"
893 " ioList[j].aiocbp-E<gt>aio_sigevent.sigev_value.sival_ptr =\n"
894 " &ioList[j];\n"
895 "\\&\n"
896 " s = aio_read(ioList[j].aiocbp);\n"
897 " if (s == -1)\n"
898 " errExit(\"aio_read\");\n"
899 " }\n"
900 "\\&\n"
901 " openReqs = numReqs;\n"
902 "\\&\n"
903 " /* Loop, monitoring status of I/O requests. */\n"
904 "\\&\n"
905 " while (openReqs E<gt> 0) {\n"
906 " sleep(3); /* Delay between each monitoring step */\n"
907 "\\&\n"
908 " if (gotSIGQUIT) {\n"
909 "\\&\n"
910 " /* On receipt of SIGQUIT, attempt to cancel each of the\n"
911 " outstanding I/O requests, and display status returned\n"
912 " from the cancelation requests. */\n"
913 "\\&\n"
914 " printf(\"got SIGQUIT; canceling I/O requests: \\[rs]n\");\n"
915 "\\&\n"
916 " for (size_t j = 0; j E<lt> numReqs; j++) {\n"
917 " if (ioList[j].status == EINPROGRESS) {\n"
918 " printf(\" Request %zu on descriptor %d:\", j,\n"
919 " ioList[j].aiocbp-E<gt>aio_fildes);\n"
920 " s = aio_cancel(ioList[j].aiocbp-E<gt>aio_fildes,\n"
921 " ioList[j].aiocbp);\n"
922 " if (s == AIO_CANCELED)\n"
923 " printf(\"I/O canceled\\[rs]n\");\n"
924 " else if (s == AIO_NOTCANCELED)\n"
925 " printf(\"I/O not canceled\\[rs]n\");\n"
926 " else if (s == AIO_ALLDONE)\n"
927 " printf(\"I/O all done\\[rs]n\");\n"
928 " else\n"
929 " perror(\"aio_cancel\");\n"
930 " }\n"
931 " }\n"
932 "\\&\n"
933 " gotSIGQUIT = 0;\n"
934 " }\n"
935 "\\&\n"
936 " /* Check the status of each I/O request that is still\n"
937 " in progress. */\n"
938 "\\&\n"
939 " printf(\"aio_error():\\[rs]n\");\n"
940 " for (size_t j = 0; j E<lt> numReqs; j++) {\n"
941 " if (ioList[j].status == EINPROGRESS) {\n"
942 " printf(\" for request %zu (descriptor %d): \",\n"
943 " j, ioList[j].aiocbp-E<gt>aio_fildes);\n"
944 " ioList[j].status = aio_error(ioList[j].aiocbp);\n"
945 "\\&\n"
946 " switch (ioList[j].status) {\n"
947 " case 0:\n"
948 " printf(\"I/O succeeded\\[rs]n\");\n"
949 " break;\n"
950 " case EINPROGRESS:\n"
951 " printf(\"In progress\\[rs]n\");\n"
952 " break;\n"
953 " case ECANCELED:\n"
954 " printf(\"Canceled\\[rs]n\");\n"
955 " break;\n"
956 " default:\n"
957 " perror(\"aio_error\");\n"
958 " break;\n"
959 " }\n"
960 "\\&\n"
961 " if (ioList[j].status != EINPROGRESS)\n"
962 " openReqs--;\n"
963 " }\n"
964 " }\n"
965 " }\n"
966 "\\&\n"
967 " printf(\"All I/O requests completed\\[rs]n\");\n"
968 "\\&\n"
969 " /* Check status return of all I/O requests. */\n"
970 "\\&\n"
971 " printf(\"aio_return():\\[rs]n\");\n"
972 " for (size_t j = 0; j E<lt> numReqs; j++) {\n"
973 " ssize_t s;\n"
974 "\\&\n"
975 " s = aio_return(ioList[j].aiocbp);\n"
976 " printf(\" for request %zu (descriptor %d): %zd\\[rs]n\",\n"
977 " j, ioList[j].aiocbp-E<gt>aio_fildes, s);\n"
978 " }\n"
979 "\\&\n"
980 " exit(EXIT_SUCCESS);\n"
981 "}\n"
982 msgstr ""
983
984 #. type: Plain text
985 #: debian-trixie fedora-44 fedora-rawhide
986 msgid ""
987 "\"Asynchronous I/O Support in Linux 2.5\", Bhattacharya, Pratt, Pulavarty, "
988 "and Morgan, Proceedings of the Linux Symposium, 2003, E<.UR https://"
989 "www.kernel.org/doc/ols/2003/ols2003-pages-351-366.pdf> E<.UE>"
990 msgstr ""
991
992 #. type: TH
993 #: fedora-44 fedora-rawhide
994 #, no-wrap
995 msgid "Linux man-pages 6.13"
996 msgstr "Páginas de Manual de Linux 6.13"
997
998 #. type: TH
999 #: mageia-cauldron
1000 #, no-wrap
1001 msgid "Linux man-pages 6.17"
1002 msgstr "Páginas de Manual de Linux 6.17"
1003
1004 #. type: TH
1005 #: opensuse-leap-16-1 opensuse-tumbleweed
1006 #, no-wrap
1007 msgid "Linux man-pages (unreleased)"
1008 msgstr "Páginas de Manual de Linux (no publicadas)"