Subject: Re: Script interpreter path length limit (POUNDBANGLIMIT)
From: Bart Schaefer <[email-masked]>
To: [email-masked]
Date: Wed, 10 Aug 2016 19:20:08 -0700
List-Id: Zsh Workers List <zsh-workers.zsh.org>

On Aug 10,  8:41pm, Dennis Sperlich wrote:
}
} It seems like there is a arbitrary 63 character limit on the interpreter
} char buffer. At least this is what i understand from the code in
} Src/exec.c starting line 431.

The specific choice of 64 for the buffer size (63+nul) is historical and
loosely based on OS limitations of the 1990s.

A LOT of info about this here:

    http://www.in-ulm.de/~mascheck/various/shebang/#results

Rather lacking in very-recent OS's, but you get the idea how inconsistent
this is.  I can't find anything about a standard way to look up the limit
on the build architecture, probably because POSIX defines #! as optional.

The limit in zsh could be expanded to allow the OS to flag the error.