problems with direct STk-scripts lauching

From: Francis PUECH <puech_at_limeil.cea.fr>
Date: Wed, 15 Feb 95 22:41:43 +0100

there is indeed a problem with direct script lauching (i.e. with #!)
as .../bin/stk is now a Bourne script and a bunch of systems
(Solaris, Irix, Unicos,...) do not honor the #! hack if the pathname
mentionned leads to anything but an executable BINARY.
so the exec(2) system call fails and your shell (as always) takes the file
as an input file for another instance of itself (or $SHELL or ...)

Hilmar Lapp <hili_at_al-bundy.biologie.uni-freiburg.de> says it's OK with bash.
I don't know why.(maybe bash takes on some work normally done by the kernel)

there is another problem related to #! :

on some systems the length of the interpreter pathname must be < 32 chars
(often not documented). If you don't have write permission to /usr/local/bin

#!/some/long/pathname/to/my/home/directory/bin/stk -f
...

won't work

so there is probably a need for a small, generic (probably OK with most system
admins) launcher one can use by:

#!/usr/local/bin/launch
#/THIS/IS/THE/REAL/PATH/TO/INTERPRETER -f
...

note that STk would need to skip more than one '# line' at the beginning of
the script.

I'm sure it can be found on the net. Any pointer ??

        Francis Puech
        puech_at_limeil.cea.fr
Received on Wed Feb 15 1995 - 22:44:44 CET

This archive was generated by hypermail 2.3.0 : Mon Jul 21 2014 - 19:38:59 CEST