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 [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to