From owner-freebsd-hackers Sun May 11 01:31:41 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id BAA18257 for hackers-outgoing; Sun, 11 May 1997 01:31:41 -0700 (PDT) Received: from labs.usn.blaze.net.au (labs.usn.blaze.net.au [203.17.53.30]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id BAA18252 for ; Sun, 11 May 1997 01:31:36 -0700 (PDT) Received: from labs.usn.blaze.net.au (local [127.0.0.1]) by labs.usn.blaze.net.au (8.8.5/8.8.5) with ESMTP id SAA04202; Sun, 11 May 1997 18:29:45 +1000 (EST) Message-Id: <199705110829.SAA04202@labs.usn.blaze.net.au> X-Mailer: exmh version 2.0gamma 1/27/96 To: "Marty Leisner" cc: freebsd-hackers@freebsd.org Subject: Re: socketpair() In-reply-to: Your message of "Sat, 10 May 1997 13:44:57 PDT." <9705102044.AA01420@gnu.sdsp.mc.xerox.com> X-Face: (W@z~5kg?"+5?!2kHP)+l369.~a@oTl^8l87|/s8"EH?Uk~P#N+Ec~Z&@;'LL!;3?y Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sun, 11 May 1997 18:29:43 +1000 From: David Nugent Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk > >I remember some discussion a while ago about pipe() in FreeBSD > >having been implemented (until recently?) using socketpair(), > >so perhaps there's no difference. What about with regards to > >portability and so forth? > > I think socketpair gives you bidirectional pipes... pipe() should too, I think. I've never come across an implementation that doesn't. Or, at least it doesn't seem to matter which returned handle you use for reading and which for writing. [popen() of course doesn't, but that's a different story]. I had seen socketpair() used in BSDI's authentication code, which is why I asked. Previously we were using popen(), but perhaps your comments are relevent. Their new authentication api allows writing to the pipe as well before starting to listen on it for the authentication data, so it /has/ to be bidirectional. I just didn't know that pipe had that limitation, assuming it does. Regards, David Nugent - Unique Computing Pty Ltd - Melbourne, Australia Voice +61-3-9791-9547 Data/BBS +61-3-9792-3507 3:632/348@fidonet davidn@freebsd.org davidn@blaze.net.au http://www.blaze.net.au/~davidn/