From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: Date: Sat, 3 Jan 2009 22:56:56 -0800 From: "Russ Cox" To: "Fans of the OS Plan 9 from Bell Labs" <9fans@9fans.net> Subject: Re: [9fans] Why do we need syspipe() ? In-Reply-To: <1231045486.11463.245.camel@goose.sun.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <1231045486.11463.245.camel@goose.sun.com> Topicbox-Message-UUID: 77e86f4e-ead4-11e9-9d60-3106f5b1d025 On Sat, Jan 3, 2009 at 9:04 PM, Roman V. Shaposhnik wrote: > I'm confused. Is there any part of syspipe() that can NOT > be done from userspace? Why does it have to be a syscall? > > P.S. I would also argue that sysdup() would seem to be superfluous > if more feature-rich devdup was available. I don't believe you can write a race-free implementation of the pipe system call using #|. I also don't believe you can implement the dup system call (remember, it has two arguments) using #d. If you disagree, show me the code. Russ