Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 17 Mar 2001 18:00:55 +0200
From:      Peter Pentchev <roam@orbitel.bg>
To:        Dag-Erling Smorgrav <des@ofug.org>
Cc:        Tony Finch <dot@dotat.at>, Duncan Barclay <dmlb@dmlb.org>, Kris Kennaway <kris@obsecurity.org>, hackers@FreeBSD.ORG, fs@FreeBSD.ORG
Subject:   Re: httpfs
Message-ID:  <20010317180055.A486@ringworld.oblivion.bg>
In-Reply-To: <xzpvgp8cry9.fsf@flood.ping.uio.no>; from des@ofug.org on Sat, Mar 17, 2001 at 04:53:34PM %2B0100
References:  <20010310031515.A8998@mollari.cthul.hu> <20010315095533.C12432@ringworld.oblivion.bg> <000d01c0ad3c$0ed83fb0$d26020c2@Cadence.COM> <000d01c0ad3c$0ed83fb0$d26020c2@Cadence.COM> <20010315124244.A442@ringworld.oblivion.bg> <20010316054649.F385@hand.dotat.at> <20010316174424.A428@ringworld.oblivion.bg> <xzpvgp8cry9.fsf@flood.ping.uio.no>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Mar 17, 2001 at 04:53:34PM +0100, Dag-Erling Smorgrav wrote:
> Peter Pentchev <roam@orbitel.bg> writes:
> > There was at the time - socketpair(2) had totally slipped my mind ;)
> 
> Umm, you want pipe(2), not socketpair(2).

Actually, I want socketpair(2).  pipe(2) was what I used before,
and that's the reason I had a read-only file descriptor - the portalfs
architecture allows for only one fd to be returned, and pipe(2)
provides a one-way pipe.  I dup2'd stdout and stderr of the executed
program to the child fd, and the parent could read its output, yet
not write to its stdin.

With socketpair(2), I can dup stdin, too, and have mount_portal return
a two-way pipe/fd/socket to whoever requested it.  At least, that's
the common/standard/easiest way to create a two-way pipe on the same
fd, described in APUE :)

G'luck,
Peter

-- 
This would easier understand fewer had omitted.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-fs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010317180055.A486>