IDEA: Process-Special files

Tim Hockin (thockin@isunix.it.ilstu.edu)
Mon, 19 Oct 1998 13:58:00 -0500 (CDT)


I had an idea. What I would like is for anyone to tell me if this has been
done, tried, ruled out, is stupid, useless, impossible, or if maybe I have
a good idea.

What I am thinking is what I have tentatively called " process-special "
files.

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? Does it sound like
something that would be worthwhile?

I would like to hear all sorts of feedback, please, either to the list, or
me privately.

Tim
thockin@isunix.it.ilstu.edu

p.s. - other thoughts:
there would need to be SOME way to edit the file :)
could this be made generic so that it is not ext2 dependant?
am I just an imbecile?

-
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/