From owner-freebsd-fs Thu Mar 15 2:43:30 2001 Delivered-To: freebsd-fs@freebsd.org Received: from ringworld.nanolink.com (ringworld.nanolink.com [195.24.48.13]) by hub.freebsd.org (Postfix) with SMTP id 606C437B718 for ; Thu, 15 Mar 2001 02:43:25 -0800 (PST) (envelope-from roam@orbitel.bg) Received: (qmail 1019 invoked by uid 1000); 15 Mar 2001 10:42:44 -0000 Date: Thu, 15 Mar 2001 12:42:44 +0200 From: Peter Pentchev To: Duncan Barclay Cc: Kris Kennaway , hackers@FreeBSD.org, fs@FreeBSD.org Subject: Re: httpfs Message-ID: <20010315124244.A442@ringworld.oblivion.bg> Mail-Followup-To: Duncan Barclay , Kris Kennaway , hackers@FreeBSD.org, fs@FreeBSD.org References: <20010310031515.A8998@mollari.cthul.hu> <20010315095533.C12432@ringworld.oblivion.bg> <000d01c0ad3c$0ed83fb0$d26020c2@Cadence.COM> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <000d01c0ad3c$0ed83fb0$d26020c2@Cadence.COM>; from dmlb@dmlb.org on Thu, Mar 15, 2001 at 10:38:21AM -0000 Sender: owner-freebsd-fs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Thu, Mar 15, 2001 at 10:38:21AM -0000, Duncan Barclay wrote: > Hi > > A thing to keep in mind about the portal file system is that it > designed to provide a means of getting a file handle to an object that > could be obtained by a call to open(2). It does not then provide > a means of reading/writing etc. to that object. > > If you take a look at the example portal.conf then you can see how > this can be used to open a socket via a pathname. Operations on the > socket are then make using write(2) etc. > > I don't really think that portalfs is the right thing to use to build > an httpfs with, but I would like to see how you managed to get your example > to work. Are you using stdout to create an anonymous file handle? What happens > if two processes concurrently read from /p/http/*? What I did was implement an 'exec' portal method, which executes a program with given arguments, obtained from the path components and portal.conf rules, and returns a - basically read-only - descriptor connected to its stdout and stderr. Kind of simple, pipe(), fork(), dup2(), exec().. the main trouble was with parsing the argument rules :) I'll clean it up in a few hours, and post it somewhere.. G'luck, Peter -- If there were no counterfactuals, this sentence would not have been paradoxical. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message