Debian Codegraph @

po/es/man2/pipe.2.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 # Gerardo Aburruzaga García <[email protected]>, 1998.
5 msgid ""
6 msgstr ""
7 "Project-Id-Version: manpages-l10n\n"
8 "POT-Creation-Date: 2026-06-05 06:35+0200\n"
9 "PO-Revision-Date: 2021-01-30 16:17+0100\n"
10 "Last-Translator: Gerardo Aburruzaga García <[email protected]>\n"
11 "Language-Team: Spanish <[email protected]>\n"
12 "Language: es\n"
13 "MIME-Version: 1.0\n"
14 "Content-Type: text/plain; charset=UTF-8\n"
15 "Content-Transfer-Encoding: 8bit\n"
16 "Plural-Forms: nplurals=2; plural=(n != 1);\n"
17 "X-Generator: Lokalize 20.04.1\n"
18
19 #. type: TH
20 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
21 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
22 #, no-wrap
23 msgid "pipe"
24 msgstr ""
25
26 #. type: TH
27 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
28 #: opensuse-tumbleweed
29 #, no-wrap
30 msgid "2026-02-08"
31 msgstr "8 Febrero 2026"
32
33 #. type: TH
34 #: archlinux debian-unstable
35 #, fuzzy, no-wrap
36 #| msgid "Linux man-pages 6.17"
37 msgid "Linux man-pages 6.18"
38 msgstr "Páginas de Manual de Linux 6.17"
39
40 #. type: SH
41 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
42 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
43 #, no-wrap
44 msgid "NAME"
45 msgstr "NOMBRE"
46
47 #. type: Plain text
48 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
49 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
50 msgid "pipe, pipe2 - create pipe"
51 msgstr "pipe, pipe2 - crea una tubería o interconexión"
52
53 #. type: SH
54 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
55 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
56 #, no-wrap
57 msgid "LIBRARY"
58 msgstr "BIBLIOTECA"
59
60 #. type: Plain text
61 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
62 #: opensuse-leap-16-1 opensuse-tumbleweed
63 msgid "Standard C library (I<libc>,\\ I<-lc>)"
64 msgstr "Biblioteca Estándar C (I<libc>,\\ I<-lc>)"
65
66 #. type: SH
67 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
68 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
69 #, no-wrap
70 msgid "SYNOPSIS"
71 msgstr "SINOPSIS"
72
73 #. type: Plain text
74 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
75 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
76 #, no-wrap
77 msgid "B<#include E<lt>unistd.hE<gt>>\n"
78 msgstr "B<#include E<lt>unistd.hE<gt>>\n"
79
80 #. type: Plain text
81 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
82 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
83 #, fuzzy, no-wrap
84 #| msgid "B<int pipe2(int >I<pipefd>B<[2], int >I<flags>B<);>\n"
85 msgid "B<int pipe(int >I<pipefd>B<[2]);>\n"
86 msgstr "B<int pipe2(int >I<pipefd>B<[2], int >I<flags>B<);>\n"
87
88 #. type: Plain text
89 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
90 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
91 #, fuzzy, no-wrap
92 #| msgid ""
93 #| "B<#define _GNU_SOURCE> /* See feature_test_macros(7) */\n"
94 #| "B<#include E<lt>fcntl.hE<gt>>\n"
95 msgid ""
96 "B<#define _GNU_SOURCE> /* See feature_test_macros(7) */\n"
97 "B<#include E<lt>fcntl.hE<gt>> /* Definition of B<O_*> constants */\n"
98 "B<#include E<lt>unistd.hE<gt>>\n"
99 msgstr ""
100 "B<#define _GNU_SOURCE> /* Vea feature_test_macros(7) */\n"
101 "B<#include E<lt>fcntl.hE<gt>>\n"
102
103 #. type: Plain text
104 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
105 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
106 #, no-wrap
107 msgid "B<int pipe2(int >I<pipefd>B<[2], int >I<flags>B<);>\n"
108 msgstr "B<int pipe2(int >I<pipefd>B<[2], int >I<flags>B<);>\n"
109
110 #. type: Plain text
111 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
112 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
113 #, no-wrap
114 msgid ""
115 "/* On Alpha, IA-64, MIPS, SuperH, and SPARC/SPARC64, pipe() has the\n"
116 " following prototype; see VERSIONS */\n"
117 msgstr ""
118
119 #. type: Plain text
120 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
121 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
122 #, no-wrap
123 msgid ""
124 "B<struct fd_pair {>\n"
125 "B<long fd[2];>\n"
126 "B<};>\n"
127 "B<struct fd_pair pipe(void);>\n"
128 msgstr ""
129
130 #. type: SH
131 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
132 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
133 #, no-wrap
134 msgid "DESCRIPTION"
135 msgstr "DESCRIPCIÓN"
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 ""
141 "B<pipe>() creates a pipe, a unidirectional data channel that can be used "
142 "for interprocess communication. The array I<pipefd> is used to return two "
143 "file descriptors referring to the ends of the pipe. I<pipefd[0]> refers to "
144 "the read end of the pipe. I<pipefd[1]> refers to the write end of the "
145 "pipe. Data written to the write end of the pipe is buffered by the kernel "
146 "until it is read from the read end of the pipe. For further details, see "
147 "B<pipe>(7)."
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 "If I<flags> is 0, then B<pipe2>() is the same as B<pipe>(). The following "
155 "values can be bitwise ORed in I<flags> to obtain different behavior:"
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<O_CLOEXEC>"
163 msgstr "B<O_CLOEXEC>"
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 "Set the close-on-exec (B<FD_CLOEXEC>) flag on the two new file "
170 "descriptors. See the description of the same flag in B<open>(2) for "
171 "reasons why this may be useful."
172 msgstr ""
173
174 #. type: TP
175 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
176 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
177 #, no-wrap
178 msgid "B<O_DIRECT> (since Linux 3.4)"
179 msgstr "B<O_DIRECT> (desde Linux 3.4)"
180
181 #. commit 9883035ae7edef3ec62ad215611cb8e17d6a1a5d
182 #. type: Plain text
183 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
184 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
185 msgid ""
186 "Create a pipe that performs I/O in \"packet\" mode. Each B<write>(2) to "
187 "the pipe is dealt with as a separate packet, and B<read>(2)s from the pipe "
188 "will read one packet at a time. Note the following points:"
189 msgstr ""
190
191 #. type: IP
192 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
193 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
194 #, no-wrap
195 msgid "\\[bu]"
196 msgstr "\\[bu]"
197
198 #. type: Plain text
199 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
200 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
201 msgid ""
202 "Writes of greater than B<PIPE_BUF> bytes (see B<pipe>(7)) will be split "
203 "into multiple packets. The constant B<PIPE_BUF> is defined in "
204 "I<E<lt>limits.hE<gt>>."
205 msgstr ""
206
207 #. type: Plain text
208 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
209 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
210 msgid ""
211 "If a B<read>(2) specifies a buffer size that is smaller than the next "
212 "packet, then the requested number of bytes are read, and the excess bytes in "
213 "the packet are discarded. Specifying a buffer size of B<PIPE_BUF> will be "
214 "sufficient to read the largest possible packets (see the previous point)."
215 msgstr ""
216
217 #. type: Plain text
218 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
219 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
220 msgid ""
221 "Zero-length packets are not supported. (A B<read>(2) that specifies a "
222 "buffer size of zero is a no-op, and returns 0.)"
223 msgstr ""
224
225 #. type: Plain text
226 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
227 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
228 msgid ""
229 "Older kernels that do not support this flag will indicate this via an "
230 "B<EINVAL> error."
231 msgstr ""
232
233 #. commit 0dbf5f20652108106cb822ad7662c786baaa03ff
234 #. FIXME . But, it is not possible to specify O_DIRECT when opening a FIFO
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 ""
239 "Since Linux 4.5, it is possible to change the B<O_DIRECT> setting of a pipe "
240 "file descriptor using B<fcntl>(2)."
241 msgstr ""
242
243 #. type: TP
244 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
245 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
246 #, no-wrap
247 msgid "B<O_NONBLOCK>"
248 msgstr "B<O_NONBLOCK>"
249
250 #. type: Plain text
251 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
252 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
253 msgid ""
254 "Set the B<O_NONBLOCK> file status flag on the open file descriptions "
255 "referred to by the new file descriptors. Using this flag saves extra calls "
256 "to B<fcntl>(2) to achieve the same result."
257 msgstr ""
258
259 #. type: TP
260 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
261 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
262 #, no-wrap
263 msgid "B<O_NOTIFICATION_PIPE>"
264 msgstr ""
265
266 #. commit c73be61cede5882f9605a852414db559c0ebedfd
267 #. type: Plain text
268 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
269 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
270 msgid ""
271 "Since Linux 5.8, general notification mechanism is built on the top of the "
272 "pipe where kernel splices notification messages into pipes opened by user "
273 "space. The owner of the pipe has to tell the kernel which sources of events "
274 "to watch and filters can also be applied to select which subevents should be "
275 "placed into the pipe."
276 msgstr ""
277
278 #. type: SH
279 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
280 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
281 #, no-wrap
282 msgid "RETURN VALUE"
283 msgstr "VALOR DEVUELTO"
284
285 #. type: Plain text
286 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
287 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
288 #, fuzzy
289 #| msgid ""
290 #| "On success, zero is returned. On error, -1 is returned, and I<errno> is "
291 #| "set appropriately."
292 msgid ""
293 "On success, zero is returned. On error, -1 is returned, I<errno> is set to "
294 "indicate the error, and I<pipefd> is left unchanged."
295 msgstr ""
296 "En caso de éxito, se devuelve cero. En caso de error, -1, y se guarda en "
297 "I<errno> un valor apropiado."
298
299 #. http://austingroupbugs.net/view.php?id=467
300 #. type: Plain text
301 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
302 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
303 msgid ""
304 "On Linux (and other systems), B<pipe>() does not modify I<pipefd> on "
305 "failure. A requirement standardizing this behavior was added in "
306 "POSIX.1-2008 TC2. The Linux-specific B<pipe2>() system call likewise does "
307 "not modify I<pipefd> on failure."
308 msgstr ""
309
310 #. type: SH
311 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
312 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
313 #, no-wrap
314 msgid "ERRORS"
315 msgstr "ERRORES"
316
317 #. type: TP
318 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
319 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
320 #, no-wrap
321 msgid "B<EFAULT>"
322 msgstr "B<EFAULT>"
323
324 #. type: Plain text
325 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
326 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
327 #, fuzzy
328 #| msgid "I<filedes> is not valid."
329 msgid "I<pipefd> is not valid."
330 msgstr "I<descf> no es válido."
331
332 #. type: TP
333 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
334 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
335 #, no-wrap
336 msgid "B<EINVAL>"
337 msgstr "B<EINVAL>"
338
339 #. type: Plain text
340 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
341 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
342 msgid "(B<pipe2>()) Invalid value in I<flags>."
343 msgstr ""
344
345 #. type: TP
346 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
347 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
348 #, no-wrap
349 msgid "B<EMFILE>"
350 msgstr "B<EMFILE>"
351
352 #. type: Plain text
353 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
354 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
355 msgid ""
356 "The per-process limit on the number of open file descriptors has been "
357 "reached."
358 msgstr ""
359 "Se ha alcanzado el límite de descriptores de archivo abiertos para cada "
360 "proceso."
361
362 #. type: TP
363 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
364 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
365 #, no-wrap
366 msgid "B<ENFILE>"
367 msgstr "B<ENFILE>"
368
369 #. type: Plain text
370 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
371 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
372 msgid ""
373 "The system-wide limit on the total number of open files has been reached."
374 msgstr ""
375 "Se ha alcanzado el límite máximo de archivos abiertos para el conjunto del "
376 "sistema."
377
378 #. type: Plain text
379 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
380 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
381 msgid ""
382 "The user hard limit on memory that can be allocated for pipes has been "
383 "reached and the caller is not privileged; see B<pipe>(7)."
384 msgstr ""
385
386 #. type: TP
387 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
388 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
389 #, no-wrap
390 msgid "B<ENOPKG>"
391 msgstr "B<ENOPKG>"
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 msgid ""
397 "(B<pipe2>()) B<O_NOTIFICATION_PIPE> was passed in I<flags> and support for "
398 "notifications (B<CONFIG_WATCH_QUEUE>) is not compiled into the kernel."
399 msgstr ""
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 "VERSIONS"
406 msgstr "VERSIONES"
407
408 #. See http://math-atlas.sourceforge.net/devel/assembly/64.psabi.1.33.ps.Z
409 #. for example, section 3.2.1 "Registers and the Stack Frame".
410 #. type: Plain text
411 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
412 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
413 msgid ""
414 "The System V ABI on some architectures allows the use of more than one "
415 "register for returning multiple values; several architectures (namely, "
416 "Alpha, IA-64, MIPS, SuperH, and SPARC/SPARC64) (ab)use this feature in "
417 "order to implement the B<pipe>() system call in a functional manner: the "
418 "call doesn't take any arguments and returns a pair of file descriptors as "
419 "the return value on success. The glibc B<pipe>() wrapper function "
420 "transparently deals with this. See B<syscall>(2) for information regarding "
421 "registers used for storing second file descriptor."
422 msgstr ""
423
424 #. type: SH
425 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
426 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
427 #, no-wrap
428 msgid "STANDARDS"
429 msgstr "ESTÁNDARES"
430
431 #. type: Plain text
432 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
433 #: opensuse-tumbleweed
434 msgid "POSIX.1-2024."
435 msgstr "POSIX.1-2024."
436
437 #. type: SH
438 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
439 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
440 #, no-wrap
441 msgid "HISTORY"
442 msgstr "HISTORIAL"
443
444 #. type: TP
445 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
446 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
447 #, fuzzy, no-wrap
448 #| msgid "B<pipefail>"
449 msgid "B<pipe>()"
450 msgstr "B<pipefail>"
451
452 #. type: Plain text
453 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
454 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
455 msgid "POSIX.1-2001."
456 msgstr "POSIX.1-2001."
457
458 #. type: TP
459 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
460 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
461 #, fuzzy, no-wrap
462 #| msgid "B<pipefail>"
463 msgid "B<pipe2>()"
464 msgstr "B<pipefail>"
465
466 #. type: Plain text
467 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
468 #: opensuse-tumbleweed
469 msgid "POSIX.1-2024. Linux 2.6.27, glibc 2.9."
470 msgstr ""
471
472 #. type: SH
473 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
474 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
475 #, no-wrap
476 msgid "EXAMPLES"
477 msgstr "EJEMPLOS"
478
479 #. fork.2 refers to this example program.
480 #. type: Plain text
481 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
482 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
483 msgid ""
484 "The following program creates a pipe, and then B<fork>(2)s to create a child "
485 "process; the child inherits a duplicate set of file descriptors that refer "
486 "to the same pipe. After the B<fork>(2), each process closes the file "
487 "descriptors that it doesn't need for the pipe (see B<pipe>(7)). The parent "
488 "then writes the string contained in the program's command-line argument to "
489 "the pipe, and the child reads this string a byte at a time from the pipe and "
490 "echoes it on standard output."
491 msgstr ""
492
493 #. type: SS
494 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
495 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
496 #, no-wrap
497 msgid "Program source"
498 msgstr "Código fuente"
499
500 #. type: Plain text
501 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
502 #: opensuse-leap-16-1 opensuse-tumbleweed
503 #, no-wrap
504 msgid ""
505 "#include E<lt>err.hE<gt>\n"
506 "#include E<lt>stdio.hE<gt>\n"
507 "#include E<lt>stdlib.hE<gt>\n"
508 "#include E<lt>string.hE<gt>\n"
509 "#include E<lt>sys/types.hE<gt>\n"
510 "#include E<lt>sys/wait.hE<gt>\n"
511 "#include E<lt>unistd.hE<gt>\n"
512 "\\&\n"
513 "int\n"
514 "main(int argc, char *argv[])\n"
515 "{\n"
516 " int pipefd[2];\n"
517 " char buf;\n"
518 " pid_t cpid;\n"
519 "\\&\n"
520 " if (argc != 2) {\n"
521 " fprintf(stderr, \"Usage: %s E<lt>stringE<gt>\\[rs]n\", argv[0]);\n"
522 " exit(EXIT_FAILURE);\n"
523 " }\n"
524 "\\&\n"
525 " if (pipe(pipefd) == -1)\n"
526 " err(EXIT_FAILURE, \"pipe\");\n"
527 "\\&\n"
528 " cpid = fork();\n"
529 " if (cpid == -1)\n"
530 " err(EXIT_FAILURE, \"fork\");\n"
531 "\\&\n"
532 " if (cpid == 0) { /* Child reads from pipe */\n"
533 " if (close(pipefd[1]) == -1) /* Close unused write end */\n"
534 " err(EXIT_FAILURE, \"close\");\n"
535 "\\&\n"
536 " while (read(pipefd[0], &buf, 1) E<gt> 0) {\n"
537 " if (write(STDOUT_FILENO, &buf, 1) != 1)\n"
538 " err(EXIT_FAILURE, \"write\");\n"
539 " }\n"
540 "\\&\n"
541 " if (write(STDOUT_FILENO, \"\\[rs]n\", 1) != 1)\n"
542 " err(EXIT_FAILURE, \"write\");\n"
543 " if (close(pipefd[0]) == -1)\n"
544 " err(EXIT_FAILURE, \"close\");\n"
545 " _exit(EXIT_SUCCESS);\n"
546 "\\&\n"
547 " } else { /* Parent writes argv[1] to pipe */\n"
548 " if (close(pipefd[0]) == -1) /* Close unused read end */\n"
549 " err(EXIT_FAILURE, \"close\");\n"
550 " if (write(pipefd[1], argv[1], strlen(argv[1])) != strlen(argv[1]))\n"
551 " err(EXIT_FAILURE, \"write\");\n"
552 " if (close(pipefd[1]) == -1) /* Reader will see EOF */\n"
553 " err(EXIT_FAILURE, \"close\");\n"
554 " if (wait(NULL) == -1) /* Wait for child */\n"
555 " err(EXIT_FAILURE, \"wait\");\n"
556 " exit(EXIT_SUCCESS);\n"
557 " }\n"
558 "}\n"
559 msgstr ""
560
561 #. SRC END
562 #. type: SH
563 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
564 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
565 #, no-wrap
566 msgid "SEE ALSO"
567 msgstr "VÉASE TAMBIÉN"
568
569 #. type: Plain text
570 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
571 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
572 msgid ""
573 "B<fork>(2), B<read>(2), B<socketpair>(2), B<splice>(2), B<tee>(2), "
574 "B<vmsplice>(2), B<write>(2), B<popen>(3), B<pipe>(7)"
575 msgstr ""
576 "B<fork>(2), B<read>(2), B<socketpair>(2), B<splice>(2), B<tee>(2), "
577 "B<vmsplice>(2), B<write>(2), B<popen>(3), B<pipe>(7)"
578
579 #. type: TH
580 #: debian-trixie
581 #, no-wrap
582 msgid "2024-06-15"
583 msgstr "15 Junio 2024"
584
585 #. type: TH
586 #: debian-trixie
587 #, no-wrap
588 msgid "Linux man-pages 6.9.1"
589 msgstr "Páginas de Manual de Linux 6.9.1"
590
591 #. type: Plain text
592 #: debian-trixie
593 msgid "Standard C library (I<libc>, I<-lc>)"
594 msgstr "Biblioteca Estándar C (I<libc>, I<-lc>)"
595
596 #. type: Plain text
597 #: debian-trixie fedora-44 fedora-rawhide
598 msgid "POSIX.1-2008."
599 msgstr "POSIX.1-2008."
600
601 #. type: Plain text
602 #: debian-trixie fedora-44 fedora-rawhide
603 msgid "Linux."
604 msgstr "Linux."
605
606 #. type: Plain text
607 #: debian-trixie fedora-44 fedora-rawhide
608 msgid "Linux 2.6.27, glibc 2.9."
609 msgstr "Linux 2.6.27, glibc 2.9."
610
611 #. type: Plain text
612 #: debian-trixie
613 #, no-wrap
614 msgid ""
615 "#include E<lt>stdio.hE<gt>\n"
616 "#include E<lt>stdlib.hE<gt>\n"
617 "#include E<lt>string.hE<gt>\n"
618 "#include E<lt>sys/types.hE<gt>\n"
619 "#include E<lt>sys/wait.hE<gt>\n"
620 "#include E<lt>unistd.hE<gt>\n"
621 "\\&\n"
622 "int\n"
623 "main(int argc, char *argv[])\n"
624 "{\n"
625 " int pipefd[2];\n"
626 " char buf;\n"
627 " pid_t cpid;\n"
628 "\\&\n"
629 " if (argc != 2) {\n"
630 " fprintf(stderr, \"Usage: %s E<lt>stringE<gt>\\[rs]n\", argv[0]);\n"
631 " exit(EXIT_FAILURE);\n"
632 " }\n"
633 "\\&\n"
634 " if (pipe(pipefd) == -1) {\n"
635 " perror(\"pipe\");\n"
636 " exit(EXIT_FAILURE);\n"
637 " }\n"
638 "\\&\n"
639 " cpid = fork();\n"
640 " if (cpid == -1) {\n"
641 " perror(\"fork\");\n"
642 " exit(EXIT_FAILURE);\n"
643 " }\n"
644 "\\&\n"
645 " if (cpid == 0) { /* Child reads from pipe */\n"
646 " close(pipefd[1]); /* Close unused write end */\n"
647 "\\&\n"
648 " while (read(pipefd[0], &buf, 1) E<gt> 0)\n"
649 " write(STDOUT_FILENO, &buf, 1);\n"
650 "\\&\n"
651 " write(STDOUT_FILENO, \"\\[rs]n\", 1);\n"
652 " close(pipefd[0]);\n"
653 " _exit(EXIT_SUCCESS);\n"
654 "\\&\n"
655 " } else { /* Parent writes argv[1] to pipe */\n"
656 " close(pipefd[0]); /* Close unused read end */\n"
657 " write(pipefd[1], argv[1], strlen(argv[1]));\n"
658 " close(pipefd[1]); /* Reader will see EOF */\n"
659 " wait(NULL); /* Wait for child */\n"
660 " exit(EXIT_SUCCESS);\n"
661 " }\n"
662 "}\n"
663 msgstr ""
664
665 #. type: TH
666 #: fedora-44 fedora-rawhide
667 #, no-wrap
668 msgid "2024-07-23"
669 msgstr "23 ​​Julio 2024"
670
671 #. type: TH
672 #: fedora-44 fedora-rawhide
673 #, no-wrap
674 msgid "Linux man-pages 6.13"
675 msgstr "Páginas de Manual de Linux 6.13"
676
677 #. type: TH
678 #: mageia-cauldron
679 #, no-wrap
680 msgid "Linux man-pages 6.17"
681 msgstr "Páginas de Manual de Linux 6.17"
682
683 #. type: TH
684 #: opensuse-leap-16-1 opensuse-tumbleweed
685 #, no-wrap
686 msgid "Linux man-pages (unreleased)"
687 msgstr "Páginas de Manual de Linux (no publicadas)"