[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 7 Jul 2009 15:45:34 +0800
From: Changli Gao <xiaosuo@...il.com>
To: Denys Vlasenko <vda.linux@...glemail.com>
Cc: Albert ARIBAUD <albert.aribaud@...e.fr>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Amerigo Wang <xiyou.wangcong@...il.com>,
Linus Torvalds <torvalds@...ux-foundation.org>
Subject: Re: PROPOSAL: extend pipe() to support NULL argument.
On Tue, Jul 7, 2009 at 12:43 PM, Denys Vlasenko<vda.linux@...glemail.com> wrote:
> On Friday 03 July 2009 12:28, Albert ARIBAUD wrote:
>
> As I understand it, the proposal is to make pipe(NULL) return a fd,
> which can be read from and written to. Whatever you write
> is remembered, and can be retrieved by reads later.
>
> standard pipe(two_fds) returns two fds. One is only used for writes.
> Another is only used for reads. Which may be wasteful in some
> situations (like, if you have thousands of pipes).
>
> There is no trick I know of which may be used to "combine"
> these two fds into one, close second one and thus save one fd table slot.
>
Right!
mkfifo(name);
open(name, O_RDWR);
unlink(name);
Is it a trick?
--
Regards,
Changli Gao(xiaosuo@...il.com)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists