From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Daniel Colascione Newsgroups: gmane.emacs.devel Subject: Re: Fixing Windows and DOS command line argument quoting Date: Mon, 25 Apr 2011 10:56:07 -0700 Message-ID: <4DB5B5B7.3070801@gmail.com> References: <4DB4D7DB.50101@gmail.com> <83y62yal3o.fsf@gnu.org> <4DB53599.8040703@gmail.com> <4DB537BB.1090205@gnu.org> <4DB53D57.9030606@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigB5E0DAC95DBAD13C0DB06681" X-Trace: dough.gmane.org 1303754188 11103 80.91.229.12 (25 Apr 2011 17:56:28 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 25 Apr 2011 17:56:28 +0000 (UTC) Cc: emacs-devel@gnu.org To: Jason Rumney Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Apr 25 19:56:23 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QEQ1C-00085j-KK for ged-emacs-devel@m.gmane.org; Mon, 25 Apr 2011 19:56:18 +0200 Original-Received: from localhost ([::1]:47264 helo=lists2.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QEQ1C-0002kC-98 for ged-emacs-devel@m.gmane.org; Mon, 25 Apr 2011 13:56:18 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:52630) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QEQ19-0002k5-NI for emacs-devel@gnu.org; Mon, 25 Apr 2011 13:56:16 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QEQ18-0000Gk-Nv for emacs-devel@gnu.org; Mon, 25 Apr 2011 13:56:15 -0400 Original-Received: from mail-pv0-f169.google.com ([74.125.83.169]:52659) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QEQ17-0000Fk-Fi; Mon, 25 Apr 2011 13:56:13 -0400 Original-Received: by pvc12 with SMTP id 12so1637967pvc.0 for ; Mon, 25 Apr 2011 10:56:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:x-enigmail-version:content-type; bh=HsYDb4Q8hdzx0aqYTH3sa8I3IugDS8iQmPhHbSJjJlY=; b=MiapNOXkVWu1GiH1CN7ahlyDsNAv+GL/6YYIiEaocQy9EZHlDpNMJbWz4H0b42dpEb NXMpRRohmerYyYieOxsJRPuydIte6aEfl+B767KfUB9TD6eCb+6ZdpkgGR9RB9FpJ6ab gP0URtL2SmUqeb61HHP5+APadbLeGSf9n2RcQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:content-type; b=f0MSFcLCcqy1WcOrMI923/zKcVP4hZ/EP+l+JqSCrNb54YbnD9CecPx2ziQF9TFZFg sumnWE78xacB/Z9AJgOGLtPbeGRkZvIKjlpVgL1vALU3A+IrAl0H1MMejdrxdHQ3y/aJ b9t/cMRHPwOlY63pYG4YzZsMhsjg+4uNpyojs= Original-Received: by 10.68.2.1 with SMTP id 1mr7035145pbq.102.1303754172175; Mon, 25 Apr 2011 10:56:12 -0700 (PDT) Original-Received: from [192.168.1.2] (c-67-183-23-114.hsd1.wa.comcast.net [67.183.23.114]) by mx.google.com with ESMTPS id v4sm1616450pbe.100.2011.04.25.10.56.10 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 25 Apr 2011 10:56:10 -0700 (PDT) User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9 In-Reply-To: <4DB53D57.9030606@gmail.com> X-Enigmail-Version: 1.1.1 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 74.125.83.169 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:138748 Archived-At: This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigB5E0DAC95DBAD13C0DB06681 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 4/25/11 2:22 AM, Daniel Colascione wrote: > CreateProcess supports 32kb of command line; cmd supports 8kb. If the > extra 24kb is important, then we can do what you suggest: > shell-quote-argument would also to be further modified to only use leve= l > 2 metacharacters when strictly necessary. Bear in mind that the new > limit would apply only to *shell* commands explicitly, not to subproces= s > invocations in general, which would continue to be handled directly by > the code in w32proc. Besides, I think it's counter-intuitive for a > shell pipeline to stop working merely because it contains more than one= > command. After another reading of cmdproxy.c, I also see that the CreateProcess path also doesn't expand environment %variable% references, and that doesn't fall back to cmd if the command to be executed contains them. While we could expand these variables, doing so would move us even closer to reimplementing half of cmd.exe. I'd like to remove this path in the trunk and see whether the new 8192-character length limitation is a problem in practice. Direct process execution will not be affected: "shell command" will just mean "shell command", not "maybe run through the shell if we kinda guess you really meant to use the shell". --------------enigB5E0DAC95DBAD13C0DB06681 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (Darwin) iEYEARECAAYFAk21tbkACgkQ17c2LVA10VspFQCg0qQcxYggG69ddPPX6TqFLMAl 72cAoMfuQ/Op+dzDdjpfKDGY0wDnotrU =aAfc -----END PGP SIGNATURE----- --------------enigB5E0DAC95DBAD13C0DB06681--