lkml.org 
[lkml]   [2009]   [Jul]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: PROPOSAL: extend pipe() to support NULL argument.
On Fri, Jul 03, 2009 at 10:10:13AM +0800, Changli Gao wrote:
>On Fri, Jul 3, 2009 at 9:55 AM, Amerigo Wang<xiyou.wangcong@gmail.com> wrote:
>>
>>
>> What is a pipe in your mind? A pipe has two points, obviously,
>> you are making it a single point, thus you can't call it a pipe
>> any more...
>>
>> I don't like this
>How do you think the following code?
>
>mkfifo("/tmp/a", O_RDWR);
>fd = open("'/tmp/a", O_RDWR);
>
>Is it right? Is it allowed by Linux/Unix/POSIX?
>
>and when used by splice(), pipe represents a kernel buffer handler not
>its original meaning.

When I said 'pipe', I meant *anonymous* pipe, definitely!
There is nothing related with *named* pipe here.

You are going to a *wrong* direction.

>.
>>
>> And just as what you showed above, you can close the fd's
>> after finishing, thus you only save one fd during these
>> two splice(), not useful...
>splice() is a high performance system call. It maybe used in thousands
>of connection environment, so one instance saves one fd, and thousands
>of fd will be saved.

If you repeat your (pipe,splice,splice,close,close) sequence for
thousands times, it is still the same, nothing saves...


\
 
 \ /
  Last update: 2009-07-03 05:01    [W:0.052 / U:0.160 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site