H�kon Alstadheim <haalst@online.no> wrote:
+---------------
| > p.s. As long as I'm sharing grotesque hacks, the following is offered
| > without further explanation or apology: ;-} ;-}
| >
| > #!/usr/local/bin/cmucl -core /usr/local/lib/cmucl/lib/cgi.core
| > ;;;; Hack to allow CMUCL FASL files to run as shell scripts...
|
| Here is an alternative for CMUCL on linux.
...
| echo ':lisp-magic:M::FASL FILE output::/usr/bin/lisp-start:' >
| /proc/sys/fs/binfmt_misc/register
| Then, in /usr/bin/lisp-start I have:
| #!/bin/sh
| exec /usr/bin/lisp ...
+---------------
Yes, that's also described in <URL:http://www.cliki.net/CMUCL%20Hints>.
The only problem with this, of course, is that it fork/execs an additional
/bin/sh trampoline process (my hack doesn't), so it's no more efficient
than having a separate wrapper script that explicitly loads the FASL file.
The upside to the "binfmt_misc" approach, of course, is that you don't
have to put any special header in front of the FASL file, nor do you
need to use a special core image.
(Choices, choices, so many...)
-Rob
-----
Rob Warnock, PP-ASEL-IA <rpw3@rpw3.org>
627 26th Avenue <URL:http://rpw3.org/>
San Mateo, CA 94403 (650)572-2607