Re: IDEA: Process-Special files

ralf@uni-koblenz.de
Tue, 20 Oct 1998 13:26:47 +0200


On Mon, Oct 19, 1998 at 01:58:00PM -0500, Tim Hockin wrote:

> This is a file that, when open()ed for read (O_RDONLY, O_RDWR, etc) would
> be executed as a binary or script, and the output would be substituted for
> the file.
>
> For example: apache open()s a .htaccess file (set like this) which is a
> script: grep ^ww /etc/passwd #(simple, i know). When apache open()s it,
> it does not see that one line, but instead sees the results of that line
> executing. Granted, this would not be the FASTEST process in the world,
> but perhaps some sort of dependancy/cache system could help there.
>
> I imagine this would be a chattr controlled option.
>
> Has anyone ever thought about something like this?

Kernighan & Ritchie themselfes in good old Edition 7 from '77 ...

> Does it sound like something that would be worthwhile?

popen("grep ^ww /etc/passwd", "r");

> there would need to be SOME way to edit the file :)

$EDITOR

> could this be made generic so that it is not ext2 dependant?

You just answered the question why it's a bad idea to put this into a fs.

Ralf

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/