[4994] in Athena Bugs
rt 6.4R: the kernel
daemon@ATHENA.MIT.EDU (marc@ATHENA.MIT.EDU)
Tue May 29 01:48:21 1990
From: marc@ATHENA.MIT.EDU
To: bugs@ATHENA.MIT.EDU
Date: Tue, 29 May 90 01:48:07 EDT
System name: steve-dallas
Type and version: RTPC-ROMPC 6.4R
Display type: apa16
What were you trying to do?
Execute a perl script with a #! at the beginning
What's wrong:
The script pathname was 31 characters long. Apparently, this
overruns the internal buffer (subject of many previous bug reports).
The failure mode is rather brain-damaged: for lack of another shell,
it passes the script to /bin/csh (or the user's shell, I imagine).
This is merely confusing, but what if "/bin/rm -rf $HOME" was a
command in some other script language? An error should be printed
instead.
Also, if the pathname is short enough, but the shell does't
exist, the error message printed is either misleading or wrong. If I
create this file, call it foobar, and make it executable:
#!/bin/nosuchshell
echo "hello, world"
and execute it, the error message printed is "foobar: Command not
found." My guess is that an error value "command not found" is being
returned from an exec call, and the shell is printing that. What
should happen (and don't ask me how :-) is that "/bin/nosuchshell:
Shell does not exist" or something like that should be printed.
What should have happened:
See above. As I see it, the first is fixable, the second may
not be.
Please describe any relevant documentation references: