commit bash-20051027 snapshot

This commit is contained in:
Chet Ramey
2011-12-03 13:52:48 -05:00
parent 7027abcba9
commit bc7bed5099
43 changed files with 19531 additions and 11461 deletions
+9
View File
@@ -3870,9 +3870,18 @@ shell_execve (command, args, env)
if (sample_len > 2 && sample[0] == '#' && sample[1] == '!')
{
char *interp;
int ilen;
interp = getinterp (sample, sample_len, (int *)NULL);
ilen = strlen (interp);
errno = i;
if (interp[ilen - 1] == '\r')
{
interp = xrealloc (interp, ilen + 2);
interp[ilen - 1] = '^';
interp[ilen] = 'M';
interp[ilen + 1] = '\0';
}
sys_error (_("%s: %s: bad interpreter"), command, interp ? interp : "");
FREE (interp);
return (EX_NOEXEC);