1 .TH splice 2 2006-04-28 "Linux 2.6.17" "Linux Programmer's Manual"
3 splice \- splice data to/from a pipe.
5 .B #include <sys/splice.h>
7 .B long splice(int fd_in, loff_t *off_in, int fd_out, loff_t *off_out, size_t bytes, unsigned int flags);
10 The act of splicing can be seen as a way to connect two ends of a rope
11 through a kernel buffer, where that buffer is implemented as a pipe. It
12 provides a means to move data around without copying it to/from kernel/user
19 of data between file descriptor
23 where one of the descriptors must refer to a pipe. The
25 argument is a series of modifier flags:
29 Attempt to move pages instead of copying.
35 More data will be coming in a subsequent splice. This is a helpful hint when
36 the output descriptor refers to a socket, see also
49 Upon successful completion,
51 shall return the number of bytes
52 spliced to or from the pipe. Otherwise, it shall return a value of -1 and
54 shall be set to indicate an error.
59 File descriptors either not valid, or do not have proper rw permission.
62 Target file system doesn't support splicing, none of the descriptors refer
63 to a pipe or offset given for non-seekable device.
68 system call first appeared in Linux-2.6.17.
75 Jens Axboe <axboe@suse.de>