Messages in this thread |  | | From | "Ulrich Windl" <> | Date | Mon, 6 May 1996 09:35:49 +0200 | Subject | Re: Java in OS? |
| |
On 5 May 96 at 8:14, Matthias Urlichs wrote:
> In linux.dev.kernel, article <199605031507.QAA26975@snowcrash.cymru.net>, > Alan Cox <alan@cymru.net> writes: > > > How would you specify where to find the interpreter? Compiled Java > > > doesn't have comments, so you couldn't use the #!-style approach. > > > > You can add one to the front, you can also use something like the elksemu > > module that spots elks binaries by magic number, rewrites them to > > allegedly have #! and passes them to the shell interpreter. > > > Or you can add a new loader. Use binfmt_scriptshell.c as the example to > follow. > > NB: Why does trying to exec a script with an interpreter that is itself a > script cause an error? Specifically, EPERM? I think that should be allowed. > (Yes I know, other Unixes frequently don't allow this, but that's no > excuse.) > > /tmp/foo: > #!/bin/sh > echo "Did it" > > /tmp/bar: > #!/tmp/foo > # nothing interesting > > % chmod +x /tmp/foo /tmp/bar > % /tmp/bar > bash: ./bar: Permission denied > %
Maybe because of /tmp/bar: #!/tmp/bar
(loop in the kernel)
> > Hmmm... > > -- > And ever has it been known that > love knows not its own depth until the hour of separation. > --Kahlil Gibran > -- > Matthias Urlichs \ Noris Network GmbH i.Gr/ Xlink-POP Nürnberg > Schleiermacherstraße 12 \ Linux+Internet / EMail: urlichs@noris.de > 90491 Nürnberg (Germany) \ Consulting+Programming+Networking+etc'ing > PGP: 1B 89 E2 1C 43 EA 80 44 15 D2 29 CF C6 C7 E0 DE > Click <A HREF="http://info.noris.de/~smurf/finger">here</A>. 42 > >
|  |