Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm
Precedence: bulk
X-No-Archive: yes
List-Id: Zsh Workers List <zsh-workers.zsh.org>
List-Post: <mailto:zsh-workers@zsh.org>
List-Help: <mailto:zsh-workers-help@zsh.org>
X-Qmail-Scanner-Diagnostics: from mail-pa0-f48.google.com by f.primenet.com.au (envelope-from <schaefer@brasslantern.com>, uid 7791) with qmail-scanner-2.11 
 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1.  
 Clear:RC:0(209.85.220.48):SA:0(0.0/5.0):. 
 Processed in 0.122601 secs); 11 Aug 2016 02:20:20 -0000
X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au
X-Spam-Level: 
X-Spam-Status: No, score=0.0 required=5.0 tests=T_DKIM_INVALID
	autolearn=unavailable autolearn_force=no version=3.4.1
X-Envelope-From: schaefer@brasslantern.com
X-Qmail-Scanner-Mime-Attachments: |
X-Qmail-Scanner-Zip-Files: |
Received-SPF: none (ns1.primenet.com.au: domain at brasslantern.com does not designate permitted sender hosts)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=brasslantern-com.20150623.gappssmtp.com; s=20150623;
        h=from:message-id:date:in-reply-to:comments:references:to:subject
         :mime-version;
        bh=DY53pA8IEbb0rY1Trb+grQM7iP+UC8KTY/ZwtLbEt8E=;
        b=kCpefhW/AgqQWDxKgLGenW/P5xc+/ylOzP5A6b97lLo/HjUTwqQ9LjMyuhL8zSOkzb
         39/TkcJODJQgcrT0Zughy6ZGGOggO8SDYwNcx49jWtut1xMJt0bPVqL0921vfJg/yNzL
         nemfcw1JxZpTb2tYjVGl3YpEEbisPKYZYc0o9LZwqD07O+zcewYtarB/iAx35R2/fud1
         8IPYEwPfdOx1bOtPREoPaPfxbm66ZIBpH7hMGRbhpIhejNredPcWKsf4FfAggENy9Tv1
         6zCtfCJatNSJ8dCP82h1ZPK9o7crXHjDlgmAMsLLNzjI1XJmbmgx6e0LdD5CnOZrHtZX
         o0tQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:from:message-id:date:in-reply-to:comments
         :references:to:subject:mime-version;
        bh=DY53pA8IEbb0rY1Trb+grQM7iP+UC8KTY/ZwtLbEt8E=;
        b=gNUTSlutThDipLyyW4ErjBSjpKKSLdWfnJmarDUJJZ40YdQscqOil1mf60z/LSRoMq
         Yo+J2IJfvFsmh92+Oubwhrbpj5zga+NdJ4+ITKAbJPMY/qmf7yY4wkevSIRKm6pLY8RW
         XoEzTLnGEqaFNptBxo8/6YCYSndd8qEJ+AUW5D4BUaAWVbWMBKy0FWuIE8+rbOoHS0vz
         XzS3UhlzbQMdRoDriXHrKWPJOvkJaanjFlLnpvqPP9Fo3Jknjr7npcGmY3Oxb7kJ/G1u
         LF4rdKsVELCpNZYH39c6smkBIPSAP7opK3Y22vtjgMNhX0w0j7XPAjcJfjAgqYm4NGUw
         iDMA==
X-Gm-Message-State: AEkoout4q+xoF78qukFpT8SVD3h+cbZPxt+6K5fMvY82foFO0HmtUjkxIgF7wFL8SQRy1w==
X-Received: by 10.66.72.10 with SMTP id z10mr12649830pau.63.1470882013053;
        Wed, 10 Aug 2016 19:20:13 -0700 (PDT)
From: Bart Schaefer <schaefer@brasslantern.com>
Message-Id: <160810192008.ZM8784@torch.brasslantern.com>
Date: Wed, 10 Aug 2016 19:20:08 -0700
In-Reply-To: <57AB7548.6020201@gmail.com>
Comments: In reply to Dennis Sperlich <dsperlich@gmail.com>
        "Script interpreter path length limit (POUNDBANGLIMIT)" (Aug 10,  8:41pm)
References: <57AB7548.6020201@gmail.com>
X-Mailer: OpenZMail Classic (0.9.2 24April2005)
To: zsh-workers@zsh.org
Subject: Re: Script interpreter path length limit (POUNDBANGLIMIT)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Seq: zsh-workers 39020

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.

