From owner-freebsd-questions Thu Nov 16 15:13:34 2000 Delivered-To: freebsd-questions@freebsd.org Received: from eeyore.sebster.com (e163161.upc-e.chello.nl [213.93.163.161]) by hub.freebsd.org (Postfix) with SMTP id 20C6237B479 for ; Thu, 16 Nov 2000 15:13:30 -0800 (PST) Received: (qmail 95113 invoked by uid 1000); 16 Nov 2000 23:13:28 -0000 Date: Fri, 17 Nov 2000 00:13:28 +0100 From: Sebastiaan van Erk To: Alfred Perlstein Cc: freebsd-questions@freebsd.org Subject: Re: argument list too long Message-ID: <20001117001328.A87281@sebster.com> References: <20001116091607.A97857@sebster.com> <00111621362707.00522@shalimar.net.au> <20001116122313.A69018@sebster.com> <00111700205500.61931@shalimar.net.au> <20001116145641.A22842@sebster.com> <20001116105654.G830@fw.wintelcom.net> <20001116230834.A59437@sebster.com> <20001116143148.R830@fw.wintelcom.net> <20001116234938.A75489@sebster.com> <20001116145603.A17551@fw.wintelcom.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20001116145603.A17551@fw.wintelcom.net>; from bright@wintelcom.net on Thu, Nov 16, 2000 at 02:56:03PM -0800 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Alfred Perlstein wrote: > Read it and have your program cope with it, it's better than having > a non-readable memory dependant limit based on the amount of RAM > in your box and fail at weird times because you've exhasted it. What? Instead of having it fail at weird times because you somehow managed to construct an argument list of 64K? And what's the difference between execve returning E2BIG when you're out of 64K or when you're out of resources? In either case, your program will have to cope with the E2BIG. And generally it does by quitting and printing "Argument list too long." > You're making some fragile programs without reading enough > documentation to avoid it. This isn't the kernel's fault, if you > could provide a case besides a poorly written shell script as to > why the arglist needs to be any larger or smaller perhaps I could > do something for you. The point that I'm trying to make is that it's an _arbitrary_ restriction. There is no _reason_ for it. It sounds to me like all the other _arbitrary_ limits that are a pain in the behind. Like 'your lines must not be longer than 1024 characters, because I use that magic number for my buffer size, and I can't think of any other way to fill the buffer other than by reading to the first \n I find'. So my reason is _not_ that shell script (which is written poorly (in your opinion) only because of that ARBITRARY restriction, without that restriction it would have been a great little script). So I'd rather say it's the INTERFACE that's poor, and not my shell script. So, the general REASON for allowing arbitrarily long argument lists, is that you expect it to work that way. And I can't see ANY reason for arbitrarily restricting it, other than "it's easier for me to implement that way." > I'm not changing the arglist, I'm just shaking my head at your > way of thinking. Well, shake away. :-) I'll shake my head at your way of thinking. Greetings, Sebastiaan van Erk To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message