More data will be coming in a subsequent splice. To/from may block (unless they have the O_NONBLOCK flag Operations nonblocking, but splice() may neverthelessīlock because the file descriptors that are spliced Splice() call) in the future, a correct implementationĭo not block on I/O. In Linux 2.6.21 it is a no-op (but is still permitted in a Implementation of this flag was buggy: therefore starting Kernel cannot move the pages from the pipe, or if the pipeīuffers don't refer to full pages. Hint to the kernel: pages may still be copied if the Together zero or more of the following values:Īttempt to move pages instead of copying. The flags argument is a bit mask that is composed by ORing Offset from which bytes will be read from fd_in in this case,Īnalogous statements apply for fd_out and off_out. Off_in must point to a buffer which specifies the starting * If fd_in does not refer to a pipe and off_in is not NULL, then The file offset is adjusted appropriately. * If fd_in does not refer to a pipe and off_in is NULL, thenīytes are read from fd_in starting from the file offset, and * If fd_in refers to a pipe, then off_in must be NULL. The following semantics apply for fd_in and off_in: To the file descriptor fd_out, where one of the file descriptors Transfers up to len bytes of data from the file descriptor fd_in #include ssize_t splice(int fd_in, off64_t * off_in, int fd_out, off64_t * off_out, size_t len, unsigned int flags ) DESCRIPTION top splice() moves data between two file descriptors without copyingīetween kernel address space and user address space. ![]() SYNOPSIS top #define _GNU_SOURCE /* See feature_test_macros(7) */ SPLICE(2) Linux Programmer's Manual SPLICE(2) NAME top
0 Comments
Leave a Reply. |