> 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