[4548] in Athena Bugs
SHSIZE for exec
daemon@ATHENA.MIT.EDU (qjb@ATHENA.MIT.EDU)
Sat Mar 17 00:45:42 1990
From: qjb@ATHENA.MIT.EDU
Date: Sat, 17 Mar 90 00:45:30 -0500
To: bugs@ATHENA.MIT.EDU
Interpreted executables whose interpreters' names are given by
starting the file with #! are limited in the length of the
shells that they are allowed to have. Currently, this limit is
32 characters. I think that this is too short for our
environment. I was trying to have something start with
#!/afs/athena/watchmaker/contrib/@sys/perl
and could not do this because this is 40 characters long.
Perhaps if we could increase this number to 80 or something like
that, this would be good.
Granted that if we change this number, we risk producing scripts
that are not compatible with other systems, but then again, path
names differ from system to system anyway.
From /source/bsd-4.3/$hosttype/sys/sys/kern_exec.c:
#define SHSIZE 32
.....
* SHELL NAMES ARE LIMITED IN LENGTH.
.....
if (exdata.ex_shell[0] != '#' ||
exdata.ex_shell[1] != '!' ||
indir) {
u.u_error = ENOEXEC;
goto bad;
}
cp = &exdata.ex_shell[2]; /* skip "#!" */
while ((u_int)cp < (u_int)&exdata.ex_shell[SHSIZE]) {
if (*cp == '\t')
*cp = ' ';
else if (*cp == '\n') {
......
Jay