Re: Hash-bang line length

2016-01-13 Thread Chet Ramey
On 1/13/16 12:41 PM, Ludovic Courtès wrote: >>> 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.

Re: Hash-bang line length

2016-01-13 Thread Ludovic Courtès
Chet Ramey skribis: > On 1/13/16 8:52 AM, Ludovic Courtès wrote: >> Greg Wooledge 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. T

Re: Hash-bang line length

2016-01-13 Thread Greg Wooledge
On Wed, Jan 13, 2016 at 11:23:34AM -0500, Chet Ramey wrote: > On 1/13/16 9:04 AM, Greg Wooledge wrote: > > On Wed, Jan 13, 2016 at 02:52:08PM +0100, Ludovic Courtès wrote: > >> Sure, but the fact that it???s smaller than that of the kernel Linux is > >> problematic: when a hash-bang line > 127 char

Re: Hash-bang line length

2016-01-13 Thread Chet Ramey
On 1/13/16 9:04 AM, Greg Wooledge wrote: > On Wed, Jan 13, 2016 at 02:52:08PM +0100, Ludovic Courtès wrote: >> 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 fal

Re: Hash-bang line length

2016-01-13 Thread Chet Ramey
On 1/13/16 8:52 AM, Ludovic Courtès wrote: > Greg Wooledge 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 12

Re: Hash-bang line length

2016-01-13 Thread Chet Ramey
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 Unix

Re: Hash-bang line length

2016-01-13 Thread Greg Wooledge
On Wed, Jan 13, 2016 at 02:52:08PM +0100, Ludovic Courtès wrote: > 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, > but i

Re: Hash-bang line length

2016-01-13 Thread Ludovic Courtès
Greg Wooledge 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

Re: Hash-bang line length

2016-01-13 Thread Greg Wooledge
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

Hash-bang line length

2016-01-13 Thread Ludovic Courtès
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². What about changing it to 128 bytes (as well as the ‘sample’ array) to at least match Linux?