[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Hash-bang line length
From: |
Chet Ramey |
Subject: |
Re: Hash-bang line length |
Date: |
Wed, 13 Jan 2016 11:18:38 -0500 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 |
On 1/13/16 5:25 AM, 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 limit is huge compared to other Unixes, btw.
> What about changing it to 128 bytes (as well as the ‘sample’ array) to
> at least match Linux?
>
> (It might even make sense to make it bigger so that Bash might succeed
> when the kernel simply fails.)
If the kernel returns an errno other than ENOEXEC, bash isn't going to
`succeed'. This is entirely a cosmetic issue concerning the error message
bash prints when execve fails.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU chet@case.edu http://cnswww.cns.cwru.edu/~chet/
Re: Hash-bang line length,
Chet Ramey <=