From: mascheck@in-ulm.de (Sven Mascheck)
Subject: [TUHS] unix v5 limitations
Date: Mon, 11 Aug 2014 01:05:16 +0200 [thread overview]
Message-ID: <20140810230516.GA402137@lisa.in-ulm.de> (raw)
In-Reply-To: <20140809153202.AB1CE18C0AC@mercury.lcs.mit.edu>
On Sat, Aug 09, 2014 at 11:32:02AM -0400, Noel Chiappa wrote:
> John Cowan nailed this; as an aside, I don't know about V5, but in vanilla V6
> the entire argument list had to fit into one disk buffer (I would assume V5 is
> the same).
V4 to V6 had this limit of 512 bytes. It's documented in exec(2),
http://minnie.tuhs.org/cgi-bin/utree.pl?file=V4/man/man2/exec.2
http://minnie.tuhs.org/cgi-bin/utree.pl?file=V6/usr/man/man2/exec.2
and the code is in sys1.c, e.g. E2BIG,
http://minnie.tuhs.org/cgi-bin/utree.pl?file=V5/usr/sys/ken/sys1.c
> The PWB changes to v6 included a rewrite of exec() to accumulate the argument
> list in swap space, so it could be much longer; the maximum length was a
> parameter, NCARGS, which was set to 5120 (10 blocks) by default.
V7 then also implemented NCARGS (sys/param.h).
I can't read assembler and tried to find the limit in a running V1
http://code.google.com/p/unix-jun72/
with a script which just echoes its arguments, and found
- command line (script or interactive) not longer than 255 characters
- single argument not longer than about 82 characters (how this might have come off?)
Exceeding this lead to data corruption or kernel crash.
Early exec(2) reads
V1: The arguments are placed as high as possible incore: just below 60000(8).
V3: The arguments are placed as high as possible in core: just below 57000(8).
and I wonder if it's possible to determine limits from this.
Sven
(I was interested in ARG_MAX in general and collected my experiences on
http://www.in-ulm.de/~mascheck/various/argmax/)
next prev parent reply other threads:[~2014-08-10 23:05 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-09 15:32 Noel Chiappa
2014-08-10 23:05 ` Sven Mascheck [this message]
-- strict thread matches above, loose matches on Subject: below --
2014-08-09 14:37 Mark Longridge
2014-08-09 15:04 ` John Cowan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140810230516.GA402137@lisa.in-ulm.de \
--to=mascheck@in-ulm.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).