lkml.org 
[lkml]   [1996]   [May]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Java in Linux kernel: some issues

On Wed, 15 May 1996, Alan Cox wrote:

> It should be dealt with by making the loader simply load /usr/lib/javaexec
> or the like which does the mashing around of parameters and runs the
> users desired java interpreter tool. The existing java module specifies
> too much policy
>
> Alan
>

Why not simply load /usr/sbin/unknown-exec and have this user level
program determine what to do with the file, checking magic numbers and
running the appropriate interpreter. I would even allow you to run file
on whatever you are trying to exec and handle that to postcript or
whatever if that's what you want ;)

If /usr/sbin/unknown-exec doesn't exist you have normal pre-java-patch
behavior, but if it is there it receives the arguments to exec as its
arguments. I imagine it doing something along these lines:

open argv[0]
check magic numbers
if (is-java) exec(java,args...)
else if (is-foo-p-code) exec(foo,args...)
.
.
.
else return "cannot execute binary file"

In this way we don't have anything java-specific in the kernel and at the
same time we are adding a much more general mechanism at not additional
cost. Notice that this is not yet another kernel daemon but just a
program that gets executed when the kernel doesn't recognize a binary
executable format.

Guille


\
 
 \ /
  Last update: 2005-03-22 13:37    [W:0.034 / U:0.136 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site