Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

On Linux, the system calls splice(2) and tee(2) are used to transfer data between two file descriptors. One or both of the file descriptors must be a pipe, according to documentation. Why? Can this be made to work with sockets? Does it work currently, or would kernel modifications be required?

share|improve this question
up vote 1 down vote accepted

Right now they just splice pipe buffers together; socket buffers (on Linux) are different animals, and drag kernel networking into it. Limiting it to AF_LOCAL sockets would simplify implementation at the cost of complicating validation — and you still probably have to deal with them being allocated and mapped via the network buffer management subsystem instead of from anonymous file buffers.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.