From mint-bounce@lists.fishpool.fi Thu Jan 15 15:28:01 2009 X-ME-UUID: 20090115195728297.488B21C000B2@mwinf2023.orange.fr Date: Thu, 15 Jan 2009 20:57:12 +0100 From: Patrice Mandin To: mint Subject: Re: [MiNT] Commandline handling in the kernel Message-Id: <20090115205712.8f2c487c.mandin.patrice@orange.fr> In-Reply-To: <1232044292.1010.210.camel@jetpack.demon.co.uk> References: <1232019086.1010.152.camel@jetpack.demon.co.uk> <496F6D6A.5070304@freesbee.fr> <1232044292.1010.210.camel@jetpack.demon.co.uk> Organization: Chez moi X-Mailer: Sylpheed 2.5.0 (GTK+ 2.12.11; i486-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-ecartis-version: Ecartis v1.0.0 Sender: mint-bounce@lists.fishpool.fi Errors-to: mint-bounce@lists.fishpool.fi X-original-sender: mandin.patrice@orange.fr Precedence: bulk List-help: List-unsubscribe: List-Id: X-List-ID: List-subscribe: List-owner: List-post: Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by mail.sparemint.org id n0FKS0EW024395 Le Thu, 15 Jan 2009 18:31:32 +0000 Alan Hourihane a _crit: > Right, I understand ARGV, but I was getting a little disturbed by the fact > ARG_MAX returns 128, implying that ARGV is somehow getting limited to 128 as well. > That's obviously wrong. As Vincent said, it is limited to 128 bytes, hence ARG_MAX limit. For programs linked with mintlib, it is crt0.o (or something else called later in the mintlib, before the application main() function) that parses the ARGV variable from environment. If you make a program that does not link to mintlib, you are effectively limited to ARG_MAX; like asm programs for example, or TSR programs that must Ptermres() to get their memory reserved. In both cases, you don't use the mintlib crt0.o to parse ARGV. -- Patrice Mandin WWW: http://pmandin.atari.org/ Programmeur Linux, Atari Spécialité: Développement, jeux