Debian Codegraph @

templates/man2/splice.2.pot

raw
1 # SOME DESCRIPTIVE TITLE
2 # Copyright (C) YEAR Free Software Foundation, Inc.
3 # This file is distributed under the same license as the PACKAGE package.
4 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5 #
6 #, fuzzy
7 msgid ""
8 msgstr ""
9 "Project-Id-Version: PACKAGE VERSION\n"
10 "POT-Creation-Date: 2026-06-05 06:44+0200\n"
11 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
12 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13 "Language-Team: LANGUAGE <[email protected]>\n"
14 "Language: \n"
15 "MIME-Version: 1.0\n"
16 "Content-Type: text/plain; charset=UTF-8\n"
17 "Content-Transfer-Encoding: 8bit\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 "splice"
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 ""
32
33 #. type: TH
34 #: archlinux debian-unstable
35 #, no-wrap
36 msgid "Linux man-pages 6.18"
37 msgstr ""
38
39 #. type: SH
40 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
41 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
42 #, no-wrap
43 msgid "NAME"
44 msgstr ""
45
46 #. type: Plain text
47 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
48 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
49 msgid "splice - splice data to/from a pipe"
50 msgstr ""
51
52 #. type: SH
53 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
54 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
55 #, no-wrap
56 msgid "LIBRARY"
57 msgstr ""
58
59 #. type: Plain text
60 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
61 #: opensuse-leap-16-1 opensuse-tumbleweed
62 msgid "Standard C library (I<libc>,\\ I<-lc>)"
63 msgstr ""
64
65 #. type: SH
66 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
67 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
68 #, no-wrap
69 msgid "SYNOPSIS"
70 msgstr ""
71
72 #. type: Plain text
73 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
74 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
75 #, no-wrap
76 msgid ""
77 "B<#define _GNU_SOURCE> /* See feature_test_macros(7) */\n"
78 "B<#define _FILE_OFFSET_BITS 64>\n"
79 "B<#include E<lt>fcntl.hE<gt>>\n"
80 msgstr ""
81
82 #. Return type was long before glibc 2.7
83 #. type: Plain text
84 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
85 #: opensuse-leap-16-1 opensuse-tumbleweed
86 #, no-wrap
87 msgid ""
88 "B<ssize_t splice(int >I<fd_in>B<, off_t *_Nullable >I<off_in>B<,>\n"
89 "B< int >I<fd_out>B<, off_t *_Nullable >I<off_out>B<,>\n"
90 "B< size_t >I<size>B<, unsigned int >I<flags>B<);>\n"
91 msgstr ""
92
93 #. type: SH
94 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
95 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
96 #, no-wrap
97 msgid "DESCRIPTION"
98 msgstr ""
99
100 #. type: Plain text
101 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
102 #: opensuse-leap-16-1 opensuse-tumbleweed
103 msgid ""
104 "B<splice>() moves data between two file descriptors without copying between "
105 "kernel address space and user address space. It transfers up to I<size> "
106 "bytes of data from the file descriptor I<fd_in> to the file descriptor "
107 "I<fd_out>, where one of the file descriptors must refer to a pipe."
108 msgstr ""
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 msgid "The following semantics apply for I<fd_in> and I<off_in>:"
114 msgstr ""
115
116 #. type: IP
117 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
118 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
119 #, no-wrap
120 msgid "\\[bu]"
121 msgstr ""
122
123 #. type: Plain text
124 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
125 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
126 msgid "If I<fd_in> refers to a pipe, then I<off_in> must be NULL."
127 msgstr ""
128
129 #. type: Plain text
130 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
131 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
132 msgid ""
133 "If I<fd_in> does not refer to a pipe and I<off_in> is NULL, then bytes are "
134 "read from I<fd_in> starting from the file offset, and the file offset is "
135 "adjusted appropriately."
136 msgstr ""
137
138 #. type: Plain text
139 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
140 #: opensuse-leap-16-1 opensuse-tumbleweed
141 msgid ""
142 "If I<fd_in> does not refer to a pipe and I<off_in> is not NULL, then "
143 "I<off_in> must point to a buffer which specifies the starting offset from "
144 "which bytes will be read from I<fd_in>; in this case, the file offset of "
145 "I<fd_in> is not changed, and the offset pointed to by I<off_in> is adjusted "
146 "appropriately instead."
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 "Analogous statements apply for I<fd_out> and I<off_out>."
153 msgstr ""
154
155 #. type: Plain text
156 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
157 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
158 msgid ""
159 "The I<flags> argument is a bit mask that is composed by ORing together zero "
160 "or more of the following values:"
161 msgstr ""
162
163 #. type: TP
164 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
165 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
166 #, no-wrap
167 msgid "B<SPLICE_F_MOVE>"
168 msgstr ""
169
170 #. type: Plain text
171 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
172 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
173 msgid ""
174 "Attempt to move pages instead of copying. This is only a hint to the "
175 "kernel: pages may still be copied if the kernel cannot move the pages from "
176 "the pipe, or if the pipe buffers don't refer to full pages. The initial "
177 "implementation of this flag was buggy: therefore starting in Linux 2.6.21 it "
178 "is a no-op (but is still permitted in a B<splice>() call); in the future, a "
179 "correct implementation may be restored."
180 msgstr ""
181
182 #. type: TP
183 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
184 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
185 #, no-wrap
186 msgid "B<SPLICE_F_NONBLOCK>"
187 msgstr ""
188
189 #. type: Plain text
190 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
191 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
192 msgid ""
193 "Do not block on I/O. This makes the splice pipe operations nonblocking, but "
194 "B<splice>() may nevertheless block because the file descriptors that are "
195 "spliced to/from may block (unless they have the B<O_NONBLOCK> flag set)."
196 msgstr ""
197
198 #. type: TP
199 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
200 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
201 #, no-wrap
202 msgid "B<SPLICE_F_MORE>"
203 msgstr ""
204
205 #. type: Plain text
206 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
207 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
208 msgid ""
209 "More data will be coming in a subsequent splice. This is a helpful hint "
210 "when the I<fd_out> refers to a socket (see also the description of "
211 "B<MSG_MORE> in B<send>(2), and the description of B<TCP_CORK> in B<tcp>(7))."
212 msgstr ""
213
214 #. type: TP
215 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
216 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
217 #, no-wrap
218 msgid "B<SPLICE_F_GIFT>"
219 msgstr ""
220
221 #. type: Plain text
222 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
223 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
224 msgid "Unused for B<splice>(); see B<vmsplice>(2)."
225 msgstr ""
226
227 #. type: SH
228 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
229 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
230 #, no-wrap
231 msgid "RETURN VALUE"
232 msgstr ""
233
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 "Upon successful completion, B<splice>() returns the number of bytes spliced "
239 "to or from the pipe."
240 msgstr ""
241
242 #. type: Plain text
243 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
244 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
245 msgid ""
246 "A return value of 0 means end of input. If I<fd_in> refers to a pipe, then "
247 "this means that there was no data to transfer, and it would not make sense "
248 "to block because there are no writers connected to the write end of the pipe."
249 msgstr ""
250
251 #. type: Plain text
252 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
253 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
254 msgid ""
255 "On error, B<splice>() returns -1 and I<errno> is set to indicate the error."
256 msgstr ""
257
258 #. type: SH
259 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
260 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
261 #, no-wrap
262 msgid "ERRORS"
263 msgstr ""
264
265 #. type: TP
266 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
267 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
268 #, no-wrap
269 msgid "B<EAGAIN>"
270 msgstr ""
271
272 #. type: Plain text
273 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
274 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
275 msgid ""
276 "B<SPLICE_F_NONBLOCK> was specified in I<flags> or one of the file "
277 "descriptors had been marked as nonblocking (B<O_NONBLOCK>)B<,> and the "
278 "operation would block."
279 msgstr ""
280
281 #. type: TP
282 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
283 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
284 #, no-wrap
285 msgid "B<EBADF>"
286 msgstr ""
287
288 #. type: Plain text
289 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
290 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
291 msgid ""
292 "One or both file descriptors are not valid, or do not have proper read-write "
293 "mode."
294 msgstr ""
295
296 #. type: TP
297 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
298 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
299 #, no-wrap
300 msgid "B<EINVAL>"
301 msgstr ""
302
303 #. type: Plain text
304 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
305 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
306 msgid "The target filesystem doesn't support splicing."
307 msgstr ""
308
309 #. The append-mode error is given since Linux 2.6.27; in earlier kernels,
310 #. splice() in append mode was broken
311 #. type: Plain text
312 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
313 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
314 msgid "The target file is opened in append mode."
315 msgstr ""
316
317 #. type: Plain text
318 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
319 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
320 msgid "Neither of the file descriptors refers to a pipe."
321 msgstr ""
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 "An offset was given for nonseekable device (e.g., a pipe)."
327 msgstr ""
328
329 #. type: Plain text
330 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
331 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
332 msgid "I<fd_in> and I<fd_out> refer to the same pipe."
333 msgstr ""
334
335 #. type: TP
336 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
337 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
338 #, no-wrap
339 msgid "B<ENOMEM>"
340 msgstr ""
341
342 #. type: Plain text
343 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
344 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
345 msgid "Out of memory."
346 msgstr ""
347
348 #. type: TP
349 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
350 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
351 #, no-wrap
352 msgid "B<ESPIPE>"
353 msgstr ""
354
355 #. type: Plain text
356 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
357 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
358 msgid ""
359 "Either I<off_in> or I<off_out> was not NULL, but the corresponding file "
360 "descriptor refers to a pipe."
361 msgstr ""
362
363 #. type: SH
364 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
365 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
366 #, no-wrap
367 msgid "STANDARDS"
368 msgstr ""
369
370 #. type: Plain text
371 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
372 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
373 msgid "Linux."
374 msgstr ""
375
376 #. type: SH
377 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
378 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
379 #, no-wrap
380 msgid "HISTORY"
381 msgstr ""
382
383 #. type: Plain text
384 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
385 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
386 msgid "Linux 2.6.17, glibc 2.5."
387 msgstr ""
388
389 #. commit 7c77f0b3f9208c339a4b40737bb2cb0f0319bb8d
390 #. type: Plain text
391 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
392 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
393 msgid ""
394 "In Linux 2.6.30 and earlier, exactly one of I<fd_in> and I<fd_out> was "
395 "required to be a pipe. Since Linux 2.6.31, both arguments may refer to "
396 "pipes."
397 msgstr ""
398
399 #. type: SH
400 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
401 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
402 #, no-wrap
403 msgid "NOTES"
404 msgstr ""
405
406 #. type: Plain text
407 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
408 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
409 msgid ""
410 "The three system calls B<splice>(), B<vmsplice>(2), and B<tee>(2), provide "
411 "user-space programs with full control over an arbitrary kernel buffer, "
412 "implemented within the kernel using the same type of buffer that is used for "
413 "a pipe. In overview, these system calls perform the following tasks:"
414 msgstr ""
415
416 #. type: TP
417 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
418 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
419 #, no-wrap
420 msgid "B<splice>()"
421 msgstr ""
422
423 #. type: Plain text
424 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
425 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
426 msgid ""
427 "moves data from the buffer to an arbitrary file descriptor, or vice versa, "
428 "or from one buffer to another."
429 msgstr ""
430
431 #. type: TP
432 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
433 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
434 #, no-wrap
435 msgid "B<tee>(2)"
436 msgstr ""
437
438 #. type: Plain text
439 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
440 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
441 msgid "\"copies\" the data from one buffer to another."
442 msgstr ""
443
444 #. type: TP
445 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
446 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
447 #, no-wrap
448 msgid "B<vmsplice>(2)"
449 msgstr ""
450
451 #. type: Plain text
452 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
453 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
454 msgid "\"copies\" data from user space into the buffer."
455 msgstr ""
456
457 #
458 #
459 #
460 #. Linus: Now, imagine using the above in a media server, for example.
461 #. Let's say that a year or two has passed, so that the video drivers
462 #. have been updated to be able to do the splice thing, and what can
463 #. you do? You can:
464 #. - splice from the (mpeg or whatever - let's just assume that the video
465 #. input is either digital or does the encoding on its own - like they
466 #. pretty much all do) video input into a pipe (remember: no copies - the
467 #. video input will just DMA directly into memory, and splice will just
468 #. set up the pages in the pipe buffer)
469 #. - tee that pipe to split it up
470 #. - splice one end to a file (ie "save the compressed stream to disk")
471 #. - splice the other end to a real-time video decoder window for your
472 #. real-time viewing pleasure.
473 #. Linus: Now, the advantage of splice()/tee() is that you can
474 #. do zero-copy movement of data, and unlike sendfile() you can
475 #. do it on _arbitrary_ data (and, as shown by "tee()", it's more
476 #. than just sending the data to somebody else: you can duplicate
477 #. the data and choose to forward it to two or more different
478 #. users - for things like logging etc.).
479 #. type: Plain text
480 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
481 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
482 msgid ""
483 "Though we talk of copying, actual copies are generally avoided. The kernel "
484 "does this by implementing a pipe buffer as a set of reference-counted "
485 "pointers to pages of kernel memory. The kernel creates \"copies\" of pages "
486 "in a buffer by creating new pointers (for the output buffer) referring to "
487 "the pages, and increasing the reference counts for the pages: only pointers "
488 "are copied, not the pages of the buffer."
489 msgstr ""
490
491 #. type: Plain text
492 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
493 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
494 msgid ""
495 "B<_FILE_OFFSET_BITS> should be defined to be 64 in code that uses non-null "
496 "I<off_in> or I<off_out> or that takes the address of B<splice>, if the code "
497 "is intended to be portable to traditional 32-bit x86 and ARM platforms where "
498 "B<off_t>'s width defaults to 32 bits."
499 msgstr ""
500
501 #. type: SH
502 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
503 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
504 #, no-wrap
505 msgid "EXAMPLES"
506 msgstr ""
507
508 #. type: Plain text
509 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
510 #: opensuse-leap-16-1 opensuse-tumbleweed
511 msgid "See B<tee>(2) for another example."
512 msgstr ""
513
514 #. type: Plain text
515 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
516 #: opensuse-tumbleweed
517 #, no-wrap
518 msgid ""
519 "\\&\n"
520 "#define _GNU_SOURCE\n"
521 "#define _FILE_OFFSET_BITS 64\n"
522 "#include E<lt>err.hE<gt>\n"
523 "#include E<lt>fcntl.hE<gt>\n"
524 "#include E<lt>stdint.hE<gt>\n"
525 "#include E<lt>stdio.hE<gt>\n"
526 "#include E<lt>stdlib.hE<gt>\n"
527 "#include E<lt>sys/types.hE<gt>\n"
528 "#include E<lt>unistd.hE<gt>\n"
529 "\\&\n"
530 "int\n"
531 "main(void)\n"
532 "{\n"
533 " int fd;\n"
534 " int pfd[2];\n"
535 " off_t off;\n"
536 " [[gnu::nonstring]]\n"
537 "\tconst char s[12] = \"Hello, world\";\n"
538 "\\&\n"
539 " fd = open(\"out\", O_WRONLY | O_CREAT | O_EXCL, 0666);\n"
540 " if (fd == -1)\n"
541 " err(EXIT_FAILURE, \"open\");\n"
542 "\\&\n"
543 " if (pipe(pfd) == -1)\n"
544 " err(EXIT_FAILURE, \"pipe\");\n"
545 "\\&\n"
546 " if (write(pfd[1], s, sizeof(s)) != sizeof(s))\n"
547 " err(EXIT_FAILURE, \"write\");\n"
548 " if (close(pfd[1]) == -1)\n"
549 " err(EXIT_FAILURE, \"close\");\n"
550 "\\&\n"
551 " off = 10;\n"
552 " if (splice(pfd[0], NULL, fd, &off, sizeof(s), 0) != sizeof(s))\n"
553 " err(EXIT_FAILURE, \"splice\");\n"
554 " if (close(pfd[0]) == -1)\n"
555 " err(EXIT_FAILURE, \"close\");\n"
556 "\\&\n"
557 " printf(\"New offset is %jd\\[rs]n\", (intmax_t) off);\n"
558 "\\&\n"
559 " if (close(fd) == -1)\n"
560 " err(EXIT_FAILURE, \"close\");\n"
561 " exit(EXIT_SUCCESS);\n"
562 "}\n"
563 msgstr ""
564
565 #. #-#-#-#-# archlinux: splice.2.pot (PACKAGE VERSION) #-#-#-#-#
566 #. SRC END
567 #. type: SH
568 #. #-#-#-#-# debian-trixie: splice.2.pot (PACKAGE VERSION) #-#-#-#-#
569 #. type: SH
570 #. #-#-#-#-# debian-unstable: splice.2.pot (PACKAGE VERSION) #-#-#-#-#
571 #. SRC END
572 #. type: SH
573 #. #-#-#-#-# fedora-44: splice.2.pot (PACKAGE VERSION) #-#-#-#-#
574 #. SRC END
575 #. type: SH
576 #. #-#-#-#-# fedora-rawhide: splice.2.pot (PACKAGE VERSION) #-#-#-#-#
577 #. SRC END
578 #. type: SH
579 #. #-#-#-#-# mageia-cauldron: splice.2.pot (PACKAGE VERSION) #-#-#-#-#
580 #. SRC END
581 #. type: SH
582 #. #-#-#-#-# opensuse-leap-16-1: splice.2.pot (PACKAGE VERSION) #-#-#-#-#
583 #. SRC END
584 #. type: SH
585 #. #-#-#-#-# opensuse-tumbleweed: splice.2.pot (PACKAGE VERSION) #-#-#-#-#
586 #. SRC END
587 #. type: SH
588 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
589 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
590 #, no-wrap
591 msgid "SEE ALSO"
592 msgstr ""
593
594 #. type: Plain text
595 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
596 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
597 msgid ""
598 "B<copy_file_range>(2), B<sendfile>(2), B<tee>(2), B<vmsplice>(2), B<pipe>(7)"
599 msgstr ""
600
601 #. type: TH
602 #: debian-trixie
603 #, no-wrap
604 msgid "2024-05-02"
605 msgstr ""
606
607 #. type: TH
608 #: debian-trixie
609 #, no-wrap
610 msgid "Linux man-pages 6.9.1"
611 msgstr ""
612
613 #. type: Plain text
614 #: debian-trixie
615 msgid "Standard C library (I<libc>, I<-lc>)"
616 msgstr ""
617
618 #. Return type was long before glibc 2.7
619 #. type: Plain text
620 #: debian-trixie
621 #, no-wrap
622 msgid ""
623 "B<ssize_t splice(int >I<fd_in>B<, off_t *_Nullable >I<off_in>B<,>\n"
624 "B< int >I<fd_out>B<, off_t *_Nullable >I<off_out>B<,>\n"
625 "B< size_t >I<len>B<, unsigned int >I<flags>B<);>\n"
626 msgstr ""
627
628 #. type: Plain text
629 #: debian-trixie
630 msgid ""
631 "B<splice>() moves data between two file descriptors without copying between "
632 "kernel address space and user address space. It transfers up to I<len> "
633 "bytes of data from the file descriptor I<fd_in> to the file descriptor "
634 "I<fd_out>, where one of the file descriptors must refer to a pipe."
635 msgstr ""
636
637 #. type: Plain text
638 #: debian-trixie
639 msgid ""
640 "If I<fd_in> does not refer to a pipe and I<off_in> is not NULL, then "
641 "I<off_in> must point to a buffer which specifies the starting offset from "
642 "which bytes will be read from I<fd_in>; in this case, the file offset of "
643 "I<fd_in> is not changed."
644 msgstr ""
645
646 #. type: Plain text
647 #: debian-trixie
648 msgid "See B<tee>(2)."
649 msgstr ""
650
651 #. type: TH
652 #: fedora-44 fedora-rawhide
653 #, no-wrap
654 msgid "2024-11-17"
655 msgstr ""
656
657 #. type: TH
658 #: fedora-44 fedora-rawhide
659 #, no-wrap
660 msgid "Linux man-pages 6.13"
661 msgstr ""
662
663 #. type: Plain text
664 #: fedora-44 fedora-rawhide
665 #, no-wrap
666 msgid ""
667 "\\&\n"
668 "#define _GNU_SOURCE\n"
669 "#define _FILE_OFFSET_BITS 64\n"
670 "#include E<lt>err.hE<gt>\n"
671 "#include E<lt>fcntl.hE<gt>\n"
672 "#include E<lt>stdint.hE<gt>\n"
673 "#include E<lt>stdio.hE<gt>\n"
674 "#include E<lt>stdlib.hE<gt>\n"
675 "#include E<lt>sys/types.hE<gt>\n"
676 "#include E<lt>unistd.hE<gt>\n"
677 "\\&\n"
678 "int\n"
679 "main(void)\n"
680 "{\n"
681 " int fd;\n"
682 " int pfd[2];\n"
683 " off_t off;\n"
684 " const char s[12] = \"Hello, world\";\n"
685 "\\&\n"
686 " fd = open(\"out\", O_WRONLY | O_CREAT | O_EXCL, 0666);\n"
687 " if (fd == -1)\n"
688 " err(EXIT_FAILURE, \"open\");\n"
689 "\\&\n"
690 " if (pipe(pfd) == -1)\n"
691 " err(EXIT_FAILURE, \"pipe\");\n"
692 "\\&\n"
693 " if (write(pfd[1], s, sizeof(s)) != sizeof(s))\n"
694 " err(EXIT_FAILURE, \"write\");\n"
695 " if (close(pfd[1]) == -1)\n"
696 " err(EXIT_FAILURE, \"close\");\n"
697 "\\&\n"
698 " off = 10;\n"
699 " if (splice(pfd[0], NULL, fd, &off, sizeof(s), 0) != sizeof(s))\n"
700 " err(EXIT_FAILURE, \"splice\");\n"
701 " if (close(pfd[0]) == -1)\n"
702 " err(EXIT_FAILURE, \"close\");\n"
703 "\\&\n"
704 " printf(\"New offset is %jd\\[rs]n\", (intmax_t) off);\n"
705 "\\&\n"
706 " if (close(fd) == -1)\n"
707 " err(EXIT_FAILURE, \"close\");\n"
708 " exit(EXIT_SUCCESS);\n"
709 "}\n"
710 msgstr ""
711
712 #. type: TH
713 #: mageia-cauldron
714 #, no-wrap
715 msgid "Linux man-pages 6.17"
716 msgstr ""
717
718 #. type: TH
719 #: opensuse-leap-16-1 opensuse-tumbleweed
720 #, no-wrap
721 msgid "Linux man-pages (unreleased)"
722 msgstr ""