From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 79737 invoked by alias); 26 Oct 2015 16:14:13 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 79727 invoked by uid 89); 26 Oct 2015 16:14:13 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Mon, 26 Oct 2015 16:14:12 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (Postfix) with ESMTPS id 1793291EA3 for ; Mon, 26 Oct 2015 16:14:11 +0000 (UTC) Received: from [10.3.113.189] (ovpn-113-189.phx2.redhat.com [10.3.113.189]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t9QGEA3F009187 for ; Mon, 26 Oct 2015 12:14:10 -0400 Subject: Re: Command line length in Ash or Dash Shells To: cygwin@cygwin.com References: <22062.2952.946000.358554@woitok.gmail.com> From: Eric Blake Openpgp: url=http://people.redhat.com/eblake/eblake.gpg X-Enigmail-Draft-Status: N1110 Message-ID: <562E514E.4000801@redhat.com> Date: Mon, 26 Oct 2015 17:45:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <22062.2952.946000.358554@woitok.gmail.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="V18xR2FwRUqK78dNKpE2QILlMouhpELm0" X-IsSubscribed: yes X-SW-Source: 2015-10/txt/msg00462.txt.bz2 --V18xR2FwRUqK78dNKpE2QILlMouhpELm0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Content-length: 1399 On 10/26/2015 05:16 AM, Dr Rainer Woitok wrote: > Does anybody definitely know about a maximum command line length in the > Ash or Dash Shells? /bin/ash _is_ the same as /bin/dash, so there is no difference in their behavior. A windows process spawning a cygwin one, or a cygwin process spawning a windows process, are both subject to Window's limits. I'm not sure off-hand what the actual limit is, but seem to recall the figure of 64k as the combined limit for both argv and environ (that is, your command line length limit IS affected by how much is also in your environment variables at the time). And since you quoted even lower numbers for batch files, that is entirely possible that the Windows command line limit is not the only limit you will hit (I avoid batch files when possible, so I can't confirm the numbers you quoted). One cygwin process spawning another has no inherent command line limit, because cygwin processes use a back door in shared memory, rather than the normal Windows command line storage, to pass their command line arguments (in part because the windows limits are so pathetic). So once you start a dash shell, that dash shell can start any number of other dash shells with no command line length limit other than the memory available to your machine. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --V18xR2FwRUqK78dNKpE2QILlMouhpELm0 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" Content-length: 604 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJWLlFOAAoJEKeha0olJ0Nqr3wH/i+sWXSCIze2kAbWK8DlYFDz LVGgkkRL+Aegh3BhWwx/yez8LO1y/IKQQpG+Cmyvdf32ZDZEinpdEmkjeROMkgPb aUZqS3Z2gqnRki1P+lf6TVEs7cRUzjCcY4Cr/klFO2P1ywnNY8fRZ24TJH7cBmmd MadjpDCMQH+ELkSH9NiMwfFL36sScpxQrRFQ2DFqxIEtk3vXXqdES/RpqZQy9ArC l02b2qGP7muaJyx4tfuOba2HnOzTVKa8A8brc5YImsVl2XdhsSV3bz1fDt8PBUu9 Rz3oqQwp9zXo7b1qjVBQMRKF1eG5Xof2y/kVNDYKMCMgb6TumeKIv9BJq4QGvi0= =GLe1 -----END PGP SIGNATURE----- --V18xR2FwRUqK78dNKpE2QILlMouhpELm0--