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

Re: linking binfmt_misc with mime-types


On Mon, Oct 04, 1999 at 12:26:18PM +0100, Edward Betts wrote:
> Are we proposing that all mime-types have binfmt_misc setup? Does that mean,
> the kernel will be able to `run' any file in mailcap? Is that what we really
> want?
> I am neither fore, nor against this idea. On the one hand it would be quite
> cool, entering the name of an html document on the command line and it loading
> in lynx. On the other hand it goes against the Unix philosophy a bit,
> documents are programs are documents.

Ahhh. Nice that you mention it. Maybe this should really be implemented on
the Hurd, because it fits perfectly fine into the hurd philosophy. (Why this
is so, you must know that every component of the Hurd is replacable by the
user, without the necessity to trust thode components. So, in this case,
adding a personalized exec server is fine if you want to do so.)

The Hurd craps "Unix philosophy" (whatever this is) anyway. One could also
say it takes UNIX philosophy most seriously.

Indeed, I don't think you mean UNIX phiosophy here, but monolithic kernel

> Some more questions. Is it possible to recognise an html file by a couple of
> magic numbers at the beginning? Most html starts <html> or <HTML>, but it is
> not certian that it will look like this. Another thought is the possiblilty of
> running perl scripts without the bang path, but then how would the shell tell
> it is a perl script.

Uh, for SGML documents, how about looking at the <!doctype ...> ?

Anyway, I suggested even to use the file utility, so you can make use of the
magic database.

> If we put loads of entries into binfmt_misc are we likely to fill some kernel
> data table?

Ha! Under Linux probably...

> What happens if it overloads?

Complain to Linus for choosing a monolithic design or use the Hurd.

> Do we significantly affect the
> performance of the system?

Uhhhh. I better not speak about performance and the Hurd :)

But to answer your question: On the Hurd, it would first try to load it as
executable, and only if that fails it would closer look at the file. So no.

> If the kernel is checking each file against a list
> of magic numbers will it take a long time to run a file? (Probably not the
> kernel is fast, and most files we will run will be ELF, which is probably
> checked first.)


> This is not user independant is it? 

On the Hurd it is!

> The system can not be set so that one user
> has support for running Java/JPEGs from the command line, and another does
> not?


Oh, you mean Linux? No. See above :)



`Rhubarb is no Egyptian god.' Debian http://www.debian.org Check Key server 
Marcus Brinkmann              GNU    http://www.gnu.org    for public PGP Key 
Marcus.Brinkmann@ruhr-uni-bochum.de,     marcus@gnu.org    PGP Key ID 36E7CD09
http://homepage.ruhr-uni-bochum.de/Marcus.Brinkmann/       brinkmd@debian.org

Reply to: