gabriel rosenkoetter on Sun, 19 Nov 2000 21:28:46 -0500 (EST)


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

[PLUG] Re: dynamic file (script output)


On Sun, Nov 19, 2000 at 09:03:10PM -0500, Tom Stepleton wrote:
> santa maria! quite a *bit* as much work as it sounds like! "say, while
> you're at it, project xanadu is open source these days. you could cram
> it into the Linux kernel along with a Smalltalk interpreter and have a
> *xanalogically-structured filesystem*! enfiladefs! entfs! (gesticulate
> grandly) Hyyyyperrtexxxttt..." (ok a bit too harsh... apologies)

Erm. Not so much. I don't actually know how the HURD does this, but
I'd guess it's much like what Kyle Burton described in his PLUG post.
Only but extensible. That really shouldn't be that hard to hack into
fs code. (Where my scale of hard *might* be a bit skewed by all the
beating on UVM I've been doing lately, but whatever.)

That said, Kyle, the problem with your make-a-device technique is
that it only works for one very specific purpose. (Want more than
one file that does this? A file that does something different? Add
another kernel module!) Martin (and now, I, I suppose) want
something that can be told what to do when any inode in the file
system is accessed, presumably through an interface similar to
Solaris's {s,g}etfacl routine.

I do feel a bit silly about the :r! thing. Oh well.

> Ahem. If you really want to do this, your brain will thank you for
> kludging it this way: write a daemon that speaks nfs, and mount your new
> special "nfs share" somewhere. Inside is only one magical file which does
> whatever you want. This has been used before on non-Hurd systems to do
> things like magic ftp subdirectories, IIRC. (Naturally, once you do this,
> those among us with an abnormally ardent admiration of system security
> shall subsequently seek porcelain relief.)

Gak.

The socket stuff you want isn't hard, and yes, it's quite possible
to make a daemon open a FIFO, spit stuff into it, and toss that
out over NFS, even forking children to read from the FIFO if that's
your cup of tea... Kyle's description of a daemon to speak text
cat'ed into it (through some text-to-speech software) gives a better
example than I could.

What that doesn't fix, though, is interleaving input to the FIFO
and waiting for the FIFO to recylce. UDP isn't any better on the
first point (though it's got promise on the second).

> Anyway, I'll give you $5 and a free ride to Delaware if you do it in two
> weeks...

$5 isn't enough money, and I have a car, thanks.

> at any rate, I have a feeling that the best solution would be to
> reformulate the problem. Then again, if notes about Linus Torvalds's
> famous e-mail announcing Linux are interpreted correctly, it sounds like
> he got exactly what you want done - with fortune. Perhaps you could ask
> him...

Yeah, but he's mighty busy with that whole simulate-a-processor
thing these days...

On Sun, Nov 19, 2000 at 09:11:56PM -0500, MaD dUCK wrote:
> > have you thought about doing what you need to do with unix domain sockets?
> > what happens when you cat one of those? probably not much. I've never
> > tried.
> 
> can i create one of these??? and will it behave like a file?

Yes, but you'll have many of the same problems you did with a FIFO.
(So, I guess, "no" to the second part.)

... and UDP has no guarantee of delivery to boot! Whee!

(Tends to get there on local disk and most local Ethernet networks,
though.)

       ~ g r @ eclipsed.net


______________________________________________________________________
Philadelphia Linux Users Group       -      http://www.phillylinux.org
Announcements-http://lists.phillylinux.org/mail/listinfo/plug-announce
General Discussion  -  http://lists.phillylinux.org/mail/listinfo/plug