Debian Codegraph @

po/ko/man2/pipe.2.po

raw
1 # Korean translation of manpages
2 # This file is distributed under the same license as the manpages-l10n package.
3 # Copyright © of this file:
4 # 정동현 <[email protected]>, 2000.
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: 2000-04-20 08:57+0900\n"
10 "Last-Translator: 정동현 <[email protected]>\n"
11 "Language-Team: Korean <[email protected]>\n"
12 "Language: ko\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=1; plural=0;\n"
17
18 #. type: TH
19 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
20 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
21 #, no-wrap
22 msgid "pipe"
23 msgstr "pipe"
24
25 #. type: TH
26 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
27 #: opensuse-tumbleweed
28 #, no-wrap
29 msgid "2026-02-08"
30 msgstr "2026년 2월 8일"
31
32 #. type: TH
33 #: archlinux debian-unstable
34 #, no-wrap
35 msgid "Linux man-pages 6.18"
36 msgstr "Linux man-pages 6.18"
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 "이름"
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 "pipe, pipe2 - create pipe"
49 msgstr "pipe, pipe2 - 파이프를 생성한다"
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 "LIBRARY"
56 msgstr "라이브러리"
57
58 #. type: Plain text
59 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
60 #: opensuse-leap-16-1 opensuse-tumbleweed
61 msgid "Standard C library (I<libc>,\\ I<-lc>)"
62 msgstr "표준 C 라이브러리 (I<libc>,\\ I<-lc>)"
63
64 #. type: SH
65 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
66 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
67 #, no-wrap
68 msgid "SYNOPSIS"
69 msgstr "요약"
70
71 #. type: Plain text
72 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
73 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
74 #, no-wrap
75 msgid "B<#include E<lt>unistd.hE<gt>>\n"
76 msgstr "B<#include E<lt>unistd.hE<gt>>\n"
77
78 #. type: Plain text
79 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
80 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
81 #, no-wrap
82 msgid "B<int pipe(int >I<pipefd>B<[2]);>\n"
83 msgstr "B<int pipe(int >I<pipefd>B<[2]);>\n"
84
85 #. type: Plain text
86 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
87 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
88 #, no-wrap
89 msgid ""
90 "B<#define _GNU_SOURCE> /* See feature_test_macros(7) */\n"
91 "B<#include E<lt>fcntl.hE<gt>> /* Definition of B<O_*> constants */\n"
92 "B<#include E<lt>unistd.hE<gt>>\n"
93 msgstr ""
94 "B<#define _GNU_SOURCE> /* feature_test_macros(7) 참고 */\n"
95 "B<#include E<lt>fcntl.hE<gt>> /* B<O_*> 상수의 정의 */\n"
96 "B<#include E<lt>unistd.hE<gt>>\n"
97
98 #. type: Plain text
99 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
100 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
101 #, no-wrap
102 msgid "B<int pipe2(int >I<pipefd>B<[2], int >I<flags>B<);>\n"
103 msgstr "B<int pipe2(int >I<pipefd>B<[2], int >I<flags>B<);>\n"
104
105 #. type: Plain text
106 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
107 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
108 #, no-wrap
109 msgid ""
110 "/* On Alpha, IA-64, MIPS, SuperH, and SPARC/SPARC64, pipe() has the\n"
111 " following prototype; see VERSIONS */\n"
112 msgstr ""
113
114 #. type: Plain text
115 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
116 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
117 #, no-wrap
118 msgid ""
119 "B<struct fd_pair {>\n"
120 "B<long fd[2];>\n"
121 "B<};>\n"
122 "B<struct fd_pair pipe(void);>\n"
123 msgstr ""
124 "B<struct fd_pair {>\n"
125 "B<long fd[2];>\n"
126 "B<};>\n"
127 "B<struct fd_pair pipe(void);>\n"
128
129 #. type: SH
130 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
131 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
132 #, no-wrap
133 msgid "DESCRIPTION"
134 msgstr "설명"
135
136 #. type: Plain text
137 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
138 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
139 msgid ""
140 "B<pipe>() creates a pipe, a unidirectional data channel that can be used "
141 "for interprocess communication. The array I<pipefd> is used to return two "
142 "file descriptors referring to the ends of the pipe. I<pipefd[0]> refers to "
143 "the read end of the pipe. I<pipefd[1]> refers to the write end of the "
144 "pipe. Data written to the write end of the pipe is buffered by the kernel "
145 "until it is read from the read end of the pipe. For further details, see "
146 "B<pipe>(7)."
147 msgstr ""
148
149 #. type: Plain text
150 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
151 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
152 msgid ""
153 "If I<flags> is 0, then B<pipe2>() is the same as B<pipe>(). The following "
154 "values can be bitwise ORed in I<flags> to obtain different behavior:"
155 msgstr ""
156
157 #. type: TP
158 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
159 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
160 #, no-wrap
161 msgid "B<O_CLOEXEC>"
162 msgstr "B<O_CLOEXEC>"
163
164 #. type: Plain text
165 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
166 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
167 msgid ""
168 "Set the close-on-exec (B<FD_CLOEXEC>) flag on the two new file "
169 "descriptors. See the description of the same flag in B<open>(2) for "
170 "reasons why this may be useful."
171 msgstr ""
172
173 #. type: TP
174 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
175 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
176 #, no-wrap
177 msgid "B<O_DIRECT> (since Linux 3.4)"
178 msgstr ""
179
180 #. commit 9883035ae7edef3ec62ad215611cb8e17d6a1a5d
181 #. type: Plain text
182 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
183 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
184 msgid ""
185 "Create a pipe that performs I/O in \"packet\" mode. Each B<write>(2) to "
186 "the pipe is dealt with as a separate packet, and B<read>(2)s from the pipe "
187 "will read one packet at a time. Note the following points:"
188 msgstr ""
189
190 #. type: IP
191 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
192 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
193 #, no-wrap
194 msgid "\\[bu]"
195 msgstr "\\[bu]"
196
197 #. type: Plain text
198 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
199 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
200 msgid ""
201 "Writes of greater than B<PIPE_BUF> bytes (see B<pipe>(7)) will be split "
202 "into multiple packets. The constant B<PIPE_BUF> is defined in "
203 "I<E<lt>limits.hE<gt>>."
204 msgstr ""
205
206 #. type: Plain text
207 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
208 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
209 msgid ""
210 "If a B<read>(2) specifies a buffer size that is smaller than the next "
211 "packet, then the requested number of bytes are read, and the excess bytes in "
212 "the packet are discarded. Specifying a buffer size of B<PIPE_BUF> will be "
213 "sufficient to read the largest possible packets (see the previous point)."
214 msgstr ""
215
216 #. type: Plain text
217 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
218 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
219 msgid ""
220 "Zero-length packets are not supported. (A B<read>(2) that specifies a "
221 "buffer size of zero is a no-op, and returns 0.)"
222 msgstr ""
223
224 #. type: Plain text
225 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
226 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
227 msgid ""
228 "Older kernels that do not support this flag will indicate this via an "
229 "B<EINVAL> error."
230 msgstr ""
231
232 #. commit 0dbf5f20652108106cb822ad7662c786baaa03ff
233 #. FIXME . But, it is not possible to specify O_DIRECT when opening a FIFO
234 #. type: Plain text
235 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
236 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
237 msgid ""
238 "Since Linux 4.5, it is possible to change the B<O_DIRECT> setting of a pipe "
239 "file descriptor using B<fcntl>(2)."
240 msgstr ""
241
242 #. type: TP
243 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
244 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
245 #, no-wrap
246 msgid "B<O_NONBLOCK>"
247 msgstr "B<O_NONBLOCK>"
248
249 #. type: Plain text
250 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
251 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
252 msgid ""
253 "Set the B<O_NONBLOCK> file status flag on the open file descriptions "
254 "referred to by the new file descriptors. Using this flag saves extra calls "
255 "to B<fcntl>(2) to achieve the same result."
256 msgstr ""
257
258 #. type: TP
259 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
260 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
261 #, no-wrap
262 msgid "B<O_NOTIFICATION_PIPE>"
263 msgstr "B<O_NOTIFICATION_PIPE>"
264
265 #. commit c73be61cede5882f9605a852414db559c0ebedfd
266 #. type: Plain text
267 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
268 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
269 msgid ""
270 "Since Linux 5.8, general notification mechanism is built on the top of the "
271 "pipe where kernel splices notification messages into pipes opened by user "
272 "space. The owner of the pipe has to tell the kernel which sources of events "
273 "to watch and filters can also be applied to select which subevents should be "
274 "placed into the pipe."
275 msgstr ""
276
277 #. type: SH
278 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
279 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
280 #, no-wrap
281 msgid "RETURN VALUE"
282 msgstr "반환값"
283
284 #. type: Plain text
285 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
286 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
287 #, fuzzy
288 #| msgid ""
289 #| "On success, zero is returned. On error, -1 is returned, and I<errno> is "
290 #| "set appropriately."
291 msgid ""
292 "On success, zero is returned. On error, -1 is returned, I<errno> is set to "
293 "indicate the error, and I<pipefd> is left unchanged."
294 msgstr ""
295 "성공시, 0이 리턴된다. 에러시, -1이 리턴되며, I<errno>는 적당한 값으로 설정된"
296 "다."
297
298 #. http://austingroupbugs.net/view.php?id=467
299 #. type: Plain text
300 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
301 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
302 msgid ""
303 "On Linux (and other systems), B<pipe>() does not modify I<pipefd> on "
304 "failure. A requirement standardizing this behavior was added in "
305 "POSIX.1-2008 TC2. The Linux-specific B<pipe2>() system call likewise does "
306 "not modify I<pipefd> on failure."
307 msgstr ""
308
309 #. type: SH
310 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
311 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
312 #, no-wrap
313 msgid "ERRORS"
314 msgstr "에러"
315
316 #. type: TP
317 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
318 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
319 #, no-wrap
320 msgid "B<EFAULT>"
321 msgstr "B<EFAULT>"
322
323 #. type: Plain text
324 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
325 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
326 msgid "I<pipefd> is not valid."
327 msgstr "I<pipefd>가 유효하지 못하다."
328
329 #. type: TP
330 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
331 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
332 #, no-wrap
333 msgid "B<EINVAL>"
334 msgstr "B<EINVAL>"
335
336 #. type: Plain text
337 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
338 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
339 msgid "(B<pipe2>()) Invalid value in I<flags>."
340 msgstr ""
341
342 #. type: TP
343 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
344 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
345 #, no-wrap
346 msgid "B<EMFILE>"
347 msgstr "B<EMFILE>"
348
349 #. type: Plain text
350 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
351 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
352 msgid ""
353 "The per-process limit on the number of open file descriptors has been "
354 "reached."
355 msgstr ""
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<ENFILE>"
362 msgstr "B<ENFILE>"
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 system-wide limit on the total number of open files has been reached."
369 msgstr ""
370
371 #. type: Plain text
372 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
373 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
374 msgid ""
375 "The user hard limit on memory that can be allocated for pipes has been "
376 "reached and the caller is not privileged; see B<pipe>(7)."
377 msgstr ""
378
379 #. type: TP
380 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
381 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
382 #, no-wrap
383 msgid "B<ENOPKG>"
384 msgstr "B<ENOPKG>"
385
386 #. type: Plain text
387 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
388 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
389 msgid ""
390 "(B<pipe2>()) B<O_NOTIFICATION_PIPE> was passed in I<flags> and support for "
391 "notifications (B<CONFIG_WATCH_QUEUE>) is not compiled into the kernel."
392 msgstr ""
393
394 #. type: SH
395 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
396 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
397 #, no-wrap
398 msgid "VERSIONS"
399 msgstr "버전S"
400
401 #. See http://math-atlas.sourceforge.net/devel/assembly/64.psabi.1.33.ps.Z
402 #. for example, section 3.2.1 "Registers and the Stack Frame".
403 #. type: Plain text
404 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
405 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
406 msgid ""
407 "The System V ABI on some architectures allows the use of more than one "
408 "register for returning multiple values; several architectures (namely, "
409 "Alpha, IA-64, MIPS, SuperH, and SPARC/SPARC64) (ab)use this feature in "
410 "order to implement the B<pipe>() system call in a functional manner: the "
411 "call doesn't take any arguments and returns a pair of file descriptors as "
412 "the return value on success. The glibc B<pipe>() wrapper function "
413 "transparently deals with this. See B<syscall>(2) for information regarding "
414 "registers used for storing second file descriptor."
415 msgstr ""
416
417 #. type: SH
418 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
419 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
420 #, no-wrap
421 msgid "STANDARDS"
422 msgstr "표준"
423
424 #. type: Plain text
425 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
426 #: opensuse-tumbleweed
427 msgid "POSIX.1-2024."
428 msgstr "POSIX.1-2024."
429
430 #. type: SH
431 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
432 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
433 #, no-wrap
434 msgid "HISTORY"
435 msgstr "이력"
436
437 #. type: TP
438 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
439 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
440 #, no-wrap
441 msgid "B<pipe>()"
442 msgstr "B<pipe>()"
443
444 #. type: Plain text
445 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
446 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
447 msgid "POSIX.1-2001."
448 msgstr "POSIX.1-2001."
449
450 #. type: TP
451 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
452 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
453 #, no-wrap
454 msgid "B<pipe2>()"
455 msgstr "B<pipe2>()"
456
457 #. type: Plain text
458 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
459 #: opensuse-tumbleweed
460 #, fuzzy
461 #| msgid "POSIX.1-2008. Linux 2.6.16, glibc 2.4."
462 msgid "POSIX.1-2024. Linux 2.6.27, glibc 2.9."
463 msgstr "POSIX.1-2008. Linux 2.6.16, glibc 2.4."
464
465 #. type: SH
466 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
467 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
468 #, no-wrap
469 msgid "EXAMPLES"
470 msgstr "폐제"
471
472 #. fork.2 refers to this example program.
473 #. type: Plain text
474 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
475 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
476 msgid ""
477 "The following program creates a pipe, and then B<fork>(2)s to create a child "
478 "process; the child inherits a duplicate set of file descriptors that refer "
479 "to the same pipe. After the B<fork>(2), each process closes the file "
480 "descriptors that it doesn't need for the pipe (see B<pipe>(7)). The parent "
481 "then writes the string contained in the program's command-line argument to "
482 "the pipe, and the child reads this string a byte at a time from the pipe and "
483 "echoes it on standard output."
484 msgstr ""
485
486 #. type: SS
487 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
488 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
489 #, no-wrap
490 msgid "Program source"
491 msgstr ""
492
493 #. type: Plain text
494 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
495 #: opensuse-leap-16-1 opensuse-tumbleweed
496 #, no-wrap
497 msgid ""
498 "#include E<lt>err.hE<gt>\n"
499 "#include E<lt>stdio.hE<gt>\n"
500 "#include E<lt>stdlib.hE<gt>\n"
501 "#include E<lt>string.hE<gt>\n"
502 "#include E<lt>sys/types.hE<gt>\n"
503 "#include E<lt>sys/wait.hE<gt>\n"
504 "#include E<lt>unistd.hE<gt>\n"
505 "\\&\n"
506 "int\n"
507 "main(int argc, char *argv[])\n"
508 "{\n"
509 " int pipefd[2];\n"
510 " char buf;\n"
511 " pid_t cpid;\n"
512 "\\&\n"
513 " if (argc != 2) {\n"
514 " fprintf(stderr, \"Usage: %s E<lt>stringE<gt>\\[rs]n\", argv[0]);\n"
515 " exit(EXIT_FAILURE);\n"
516 " }\n"
517 "\\&\n"
518 " if (pipe(pipefd) == -1)\n"
519 " err(EXIT_FAILURE, \"pipe\");\n"
520 "\\&\n"
521 " cpid = fork();\n"
522 " if (cpid == -1)\n"
523 " err(EXIT_FAILURE, \"fork\");\n"
524 "\\&\n"
525 " if (cpid == 0) { /* Child reads from pipe */\n"
526 " if (close(pipefd[1]) == -1) /* Close unused write end */\n"
527 " err(EXIT_FAILURE, \"close\");\n"
528 "\\&\n"
529 " while (read(pipefd[0], &buf, 1) E<gt> 0) {\n"
530 " if (write(STDOUT_FILENO, &buf, 1) != 1)\n"
531 " err(EXIT_FAILURE, \"write\");\n"
532 " }\n"
533 "\\&\n"
534 " if (write(STDOUT_FILENO, \"\\[rs]n\", 1) != 1)\n"
535 " err(EXIT_FAILURE, \"write\");\n"
536 " if (close(pipefd[0]) == -1)\n"
537 " err(EXIT_FAILURE, \"close\");\n"
538 " _exit(EXIT_SUCCESS);\n"
539 "\\&\n"
540 " } else { /* Parent writes argv[1] to pipe */\n"
541 " if (close(pipefd[0]) == -1) /* Close unused read end */\n"
542 " err(EXIT_FAILURE, \"close\");\n"
543 " if (write(pipefd[1], argv[1], strlen(argv[1])) != strlen(argv[1]))\n"
544 " err(EXIT_FAILURE, \"write\");\n"
545 " if (close(pipefd[1]) == -1) /* Reader will see EOF */\n"
546 " err(EXIT_FAILURE, \"close\");\n"
547 " if (wait(NULL) == -1) /* Wait for child */\n"
548 " err(EXIT_FAILURE, \"wait\");\n"
549 " exit(EXIT_SUCCESS);\n"
550 " }\n"
551 "}\n"
552 msgstr ""
553
554 #. SRC END
555 #. type: SH
556 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
557 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
558 #, no-wrap
559 msgid "SEE ALSO"
560 msgstr "추가 참조"
561
562 #. type: Plain text
563 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
564 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
565 msgid ""
566 "B<fork>(2), B<read>(2), B<socketpair>(2), B<splice>(2), B<tee>(2), "
567 "B<vmsplice>(2), B<write>(2), B<popen>(3), B<pipe>(7)"
568 msgstr ""
569 "B<fork>(2), B<read>(2), B<socketpair>(2), B<splice>(2), B<tee>(2), "
570 "B<vmsplice>(2), B<write>(2), B<popen>(3), B<pipe>(7)"
571
572 #. type: TH
573 #: debian-trixie
574 #, no-wrap
575 msgid "2024-06-15"
576 msgstr "2024년 6월 15일"
577
578 #. type: TH
579 #: debian-trixie
580 #, no-wrap
581 msgid "Linux man-pages 6.9.1"
582 msgstr "Linux man-pages 6.9.1"
583
584 #. type: Plain text
585 #: debian-trixie
586 msgid "Standard C library (I<libc>, I<-lc>)"
587 msgstr "표준 C 라이브러리 (I<libc>, I<-lc>)"
588
589 #. type: Plain text
590 #: debian-trixie fedora-44 fedora-rawhide
591 msgid "POSIX.1-2008."
592 msgstr "POSIX.1-2008."
593
594 #. type: Plain text
595 #: debian-trixie fedora-44 fedora-rawhide
596 msgid "Linux."
597 msgstr "리눅스."
598
599 #. type: Plain text
600 #: debian-trixie fedora-44 fedora-rawhide
601 msgid "Linux 2.6.27, glibc 2.9."
602 msgstr "Linux 2.6.27, glibc 2.9."
603
604 #. type: Plain text
605 #: debian-trixie
606 #, no-wrap
607 msgid ""
608 "#include E<lt>stdio.hE<gt>\n"
609 "#include E<lt>stdlib.hE<gt>\n"
610 "#include E<lt>string.hE<gt>\n"
611 "#include E<lt>sys/types.hE<gt>\n"
612 "#include E<lt>sys/wait.hE<gt>\n"
613 "#include E<lt>unistd.hE<gt>\n"
614 "\\&\n"
615 "int\n"
616 "main(int argc, char *argv[])\n"
617 "{\n"
618 " int pipefd[2];\n"
619 " char buf;\n"
620 " pid_t cpid;\n"
621 "\\&\n"
622 " if (argc != 2) {\n"
623 " fprintf(stderr, \"Usage: %s E<lt>stringE<gt>\\[rs]n\", argv[0]);\n"
624 " exit(EXIT_FAILURE);\n"
625 " }\n"
626 "\\&\n"
627 " if (pipe(pipefd) == -1) {\n"
628 " perror(\"pipe\");\n"
629 " exit(EXIT_FAILURE);\n"
630 " }\n"
631 "\\&\n"
632 " cpid = fork();\n"
633 " if (cpid == -1) {\n"
634 " perror(\"fork\");\n"
635 " exit(EXIT_FAILURE);\n"
636 " }\n"
637 "\\&\n"
638 " if (cpid == 0) { /* Child reads from pipe */\n"
639 " close(pipefd[1]); /* Close unused write end */\n"
640 "\\&\n"
641 " while (read(pipefd[0], &buf, 1) E<gt> 0)\n"
642 " write(STDOUT_FILENO, &buf, 1);\n"
643 "\\&\n"
644 " write(STDOUT_FILENO, \"\\[rs]n\", 1);\n"
645 " close(pipefd[0]);\n"
646 " _exit(EXIT_SUCCESS);\n"
647 "\\&\n"
648 " } else { /* Parent writes argv[1] to pipe */\n"
649 " close(pipefd[0]); /* Close unused read end */\n"
650 " write(pipefd[1], argv[1], strlen(argv[1]));\n"
651 " close(pipefd[1]); /* Reader will see EOF */\n"
652 " wait(NULL); /* Wait for child */\n"
653 " exit(EXIT_SUCCESS);\n"
654 " }\n"
655 "}\n"
656 msgstr ""
657
658 #. type: TH
659 #: fedora-44 fedora-rawhide
660 #, no-wrap
661 msgid "2024-07-23"
662 msgstr "2024년 7월 23일"
663
664 #. type: TH
665 #: fedora-44 fedora-rawhide
666 #, no-wrap
667 msgid "Linux man-pages 6.13"
668 msgstr "Linux man-pages 6.13"
669
670 #. type: TH
671 #: mageia-cauldron
672 #, no-wrap
673 msgid "Linux man-pages 6.17"
674 msgstr "Linux man-pages 6.17"
675
676 #. type: TH
677 #: opensuse-leap-16-1 opensuse-tumbleweed
678 #, no-wrap
679 msgid "Linux man-pages (unreleased)"
680 msgstr "Linux man-pages (미공개)"