Re: splice question

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linus Torvalds
Date: Sunday, August 12, 2007 - 12:41 pm

On Sun, 12 Aug 2007, David H?rdeman wrote:

It's very intentional. 

You should think of "tee()" as a memcpy() on kernel buffers.

And what are kernel buffers? It's not a socket.

The "kernel buffer" is simply just another name for a pipe.

So tee() *duplicates* the data in pipe, and then you can use "splice()" on 
the duplicated data to actually send it off somewhere else (eg a socket).

(Or any other pipe operation, for that matter - you can read() it into 
user space etc).


You really should think of this as a memcpy(), and you'll be in the right 
mindframe. The system calls themselves are cheap.

			Linus
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
splice question, David , (Sun Aug 12, 9:28 am)
Re: splice question, Linus Torvalds, (Sun Aug 12, 12:41 pm)
Re: splice question, David , (Sun Aug 12, 1:56 pm)