[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Hash-bang line length
From: |
Ludovic Courtès |
Subject: |
Re: Hash-bang line length |
Date: |
Wed, 13 Jan 2016 18:41:41 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) |
Chet Ramey <chet.ramey@case.edu> skribis:
> On 1/13/16 8:52 AM, Ludovic Courtès wrote:
>> Greg Wooledge <wooledg@eeg.ccf.org> skribis:
>>
>>> On Wed, Jan 13, 2016 at 11:25:03AM +0100, Ludovic Courtès wrote:
>>>> Hello,
>>>>
>>>> The ???READ_SAMPLE_BUF??? macro in execute_cmd.c reads at most 80 bytes
>>>> from
>>>> the hash-bang line. This is less than the already-small 128-byte limit
>>>> in the Linux kernel¹ and can quite easily be hit².
>>>
>>> That's actually much bigger than one expects for shebang handling on
>>> any traditional Unix system.
>>
>> Sure, but the fact that it’s smaller than that of the kernel Linux is
>> problematic: when a hash-bang line > 127 chars is encountered, ‘execve’
>> fails with ENOENT, so Bash’s fallback code is executed, fails as well,
>
> No. Since the execve fails with ENOENT, bash just prints an error
> message.
Right, sorry for the confusion.
>> but it prints a misleading error message with an even more truncated
>> hash-bang line.
>
> Again, it's only a cosmetic issue. I don't have a problem with increasing
> the buffer size, but let's not pretend it's anything but that.
Exactly. I was talking about the “bad interpreter” error message
specifically.
Ludo’.
Re: Hash-bang line length, Chet Ramey, 2016/01/13