From unknown Thu Aug 21 14:54:22 2025 X-Loop: help-debbugs@gnu.org Subject: bug#6784: 24.0.50; cmdproxy incosistency with command pathnames Resent-From: =?UTF-8?Q?=C3=93scar?= Fuentes Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 03 Aug 2010 15:57:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 6784 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 6784@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.128085101010674 (code B ref -1); Tue, 03 Aug 2010 15:57:01 +0000 Received: (at submit) by debbugs.gnu.org; 3 Aug 2010 15:56:50 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OgJrG-0002m7-BG for submit@debbugs.gnu.org; Tue, 03 Aug 2010 11:56:50 -0400 Received: from mx10.gnu.org ([199.232.76.166]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OgJrD-0002m1-Kb for submit@debbugs.gnu.org; Tue, 03 Aug 2010 11:56:48 -0400 Received: from lists.gnu.org ([199.232.76.165]:33172) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1OgJrd-0008U4-Vt for submit@debbugs.gnu.org; Tue, 03 Aug 2010 11:57:14 -0400 Received: from [140.186.70.92] (port=40439 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OgJrc-0001OB-2Q for bug-gnu-emacs@gnu.org; Tue, 03 Aug 2010 11:57:13 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,T_RP_MATCHES_RCVD,T_TO_NO_BRKTS_FREEMAIL autolearn=unavailable version=3.3.1 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OgJrW-0000cI-Ov for bug-gnu-emacs@gnu.org; Tue, 03 Aug 2010 11:57:11 -0400 Received: from impaqm4.telefonica.net ([213.4.138.4]:49716) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OgJrW-0000bl-JI for bug-gnu-emacs@gnu.org; Tue, 03 Aug 2010 11:57:06 -0400 Received: from IMPmailhost2.adm.correo ([10.20.102.39]) by IMPaqm4.telefonica.net with bizsmtp id ppbl1e00L0r0BT63QrwtCs; Tue, 03 Aug 2010 17:56:53 +0200 Received: from qcore ([83.42.13.171]) by IMPmailhost2.adm.correo with BIZ IMP id prws1e00L3hRxRf1irwtUQ; Tue, 03 Aug 2010 17:56:53 +0200 X-Brightmail-Tracker: AAAAAA== X-TE-authinfo: authemail="981711563$telefonica.net" |auth_email="981711563@telefonica.net" X-TE-AcuTerraCos: auth_cuTerraCos="cosuitnetc01" From: =?UTF-8?Q?=C3=93scar?= Fuentes Date: Tue, 03 Aug 2010 17:56:52 +0200 Message-ID: <87iq3radvf.fsf@telefonica.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -4.5 (----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.5 (----) A command path name that contains slashes (instead of backslashes) will work fine with cmdproxy as far as it doesn't require to be executed through a shell. Otherwise only backslashes work. Example: cmdproxy.exe -c "c:/foo/bar.exe" which executes bar.exe through CreateProces, works fine, but cmdproxy.exe -c "c:/foo/bar.exe | zoo.exe" which invokes the shell for executing the command, fails with an error message that comes from cmd.exe and that says "c:" is not recognized as a command. OTOH, cmdproxy.exe -c "c:\foo\bar.exe | zoo.exe" works fine. cmd.exe has no problem with commands that uses the slash as directory separator, as this works OK: cmd /c c:/foo/bar.exe so the problem must be in cmdproxy, which probably splits the command as "c:" "/foo/bar.exe" and passes it as separate arguments to the shell. Although this bug possibly is not hard to fix, maybe we should consider the larger scenario: is it worth the trouble having two separate execution paths on cmdproxy? Inconsistencies like this among the two separate ways of executing commands may arise on the future, confusing the users. Maybe we should remove the CreateProcess method and do everything through the underlying shell. From unknown Thu Aug 21 14:54:22 2025 X-Loop: help-debbugs@gnu.org Subject: bug#6784: 24.0.50; cmdproxy incosistency with command pathnames Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 03 Aug 2010 17:21:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6784 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: =?UTF-8?Q?=C3=93scar?= Fuentes Cc: 6784@debbugs.gnu.org Reply-To: Eli Zaretskii Received: via spool by 6784-submit@debbugs.gnu.org id=B6784.128085604612871 (code B ref 6784); Tue, 03 Aug 2010 17:21:03 +0000 Received: (at 6784) by debbugs.gnu.org; 3 Aug 2010 17:20:46 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OgLAU-0003LY-6x for submit@debbugs.gnu.org; Tue, 03 Aug 2010 13:20:46 -0400 Received: from mtaout20.012.net.il ([80.179.55.166]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OgLAS-0003LS-Bl for 6784@debbugs.gnu.org; Tue, 03 Aug 2010 13:20:45 -0400 Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0L6L003006OJJZ00@a-mtaout20.012.net.il> for 6784@debbugs.gnu.org; Tue, 03 Aug 2010 20:21:10 +0300 (IDT) Received: from HOME-C4E4A596F7 ([77.127.247.236]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0L6L00BR36V9Q061@a-mtaout20.012.net.il>; Tue, 03 Aug 2010 20:21:10 +0300 (IDT) Date: Tue, 03 Aug 2010 20:21:13 +0300 From: Eli Zaretskii In-reply-to: <87iq3radvf.fsf@telefonica.net> Message-id: <83pqxzy5me.fsf@gnu.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-transfer-encoding: QUOTED-PRINTABLE X-012-Sender: halo1@inter.net.il References: <87iq3radvf.fsf@telefonica.net> X-Spam-Score: -2.0 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.0 (--) > From: =C3=93scar Fuentes > Date: Tue, 03 Aug 2010 17:56:52 +0200 > Cc:=20 >=20 > A command path name that contains slashes (instead of backslashes) = will > work fine with cmdproxy as far as it doesn't require to be executed > through a shell. Otherwise only backslashes work. Example: >=20 > cmdproxy.exe -c "c:/foo/bar.exe" >=20 > which executes bar.exe through CreateProces, works fine, but >=20 > cmdproxy.exe -c "c:/foo/bar.exe | zoo.exe" >=20 > which invokes the shell for executing the command, fails with an er= ror > message that comes from cmd.exe and that says "c:" is not recognize= d as > a command. Please show the full recipe to reproduce this problem. You don't invoke cmdproxy from the command line, do you? > Maybe we should remove the CreateProcess method and do everything > through the underlying shell. That's not a good idea if the shell is command.com, for sure. For cmd.exe, the problem is a lesser one, but it still exists; e.g., cmd.exe is limited to 4K long commands, while CreateProcess can handl= e 32K. From unknown Thu Aug 21 14:54:22 2025 X-Loop: help-debbugs@gnu.org Subject: bug#6784: 24.0.50; cmdproxy incosistency with command pathnames Resent-From: =?UTF-8?Q?=C3=93scar?= Fuentes Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 03 Aug 2010 17:53:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6784 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 6784@debbugs.gnu.org Received: via spool by 6784-submit@debbugs.gnu.org id=B6784.128085793113740 (code B ref 6784); Tue, 03 Aug 2010 17:53:01 +0000 Received: (at 6784) by debbugs.gnu.org; 3 Aug 2010 17:52:11 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OgLet-0003ZZ-57 for submit@debbugs.gnu.org; Tue, 03 Aug 2010 13:52:11 -0400 Received: from impaqm5.telefonica.net ([213.4.138.5]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OgLeq-0003ZU-Jv for 6784@debbugs.gnu.org; Tue, 03 Aug 2010 13:52:09 -0400 Received: from IMPmailhost2.adm.correo ([10.20.102.39]) by IMPaqm5.telefonica.net with bizsmtp id pou11e00G0r0BT63RtsPyf; Tue, 03 Aug 2010 19:52:23 +0200 Received: from qcore ([83.42.13.171]) by IMPmailhost2.adm.correo with BIZ IMP id ptsN1e00A3hRxRf1itsP7d; Tue, 03 Aug 2010 19:52:23 +0200 X-Brightmail-Tracker: AAAAAA== X-TE-authinfo: authemail="981711563$telefonica.net" |auth_email="981711563@telefonica.net" X-TE-AcuTerraCos: auth_cuTerraCos="cosuitnetc01" From: =?UTF-8?Q?=C3=93scar?= Fuentes References: <87iq3radvf.fsf@telefonica.net> <83pqxzy5me.fsf@gnu.org> Date: Tue, 03 Aug 2010 19:52:22 +0200 In-Reply-To: <83pqxzy5me.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 03 Aug 2010 20:21:13 +0300") Message-ID: <87ocdj8tyh.fsf@telefonica.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -2.9 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.9 (--) Eli Zaretskii writes: > Please show the full recipe to reproduce this problem. You don't > invoke cmdproxy from the command line, do you? Put this on .emacs, or start with emacs -Q and evaluate it: (setq find-program "c:/apps/gnuwin32/bin/find.exe") Now, do a rgrep. There is no problem if you use the backslash as the path separator. >> Maybe we should remove the CreateProcess method and do everything >> through the underlying shell. > > That's not a good idea if the shell is command.com, for sure. Okay. > For cmd.exe, the problem is a lesser one, but it still exists; e.g., > cmd.exe is limited to 4K long commands, while CreateProcess can handle > 32K. That's one more incosistency: a long command works fine, then you put that command as part of a pipe chain and it stops working. I guess the current cmdproxy approach is the lesser evil. From unknown Thu Aug 21 14:54:22 2025 X-Loop: help-debbugs@gnu.org Subject: bug#6784: 24.0.50; cmdproxy incosistency with command pathnames Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 03 Aug 2010 18:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6784 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: =?UTF-8?Q?=C3=93scar?= Fuentes Cc: 6784@debbugs.gnu.org Reply-To: Eli Zaretskii Received: via spool by 6784-submit@debbugs.gnu.org id=B6784.128085932014392 (code B ref 6784); Tue, 03 Aug 2010 18:16:02 +0000 Received: (at 6784) by debbugs.gnu.org; 3 Aug 2010 18:15:20 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OgM1H-0003k4-VL for submit@debbugs.gnu.org; Tue, 03 Aug 2010 14:15:20 -0400 Received: from mtaout22.012.net.il ([80.179.55.172]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OgM1E-0003jn-Vv for 6784@debbugs.gnu.org; Tue, 03 Aug 2010 14:15:18 -0400 Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0L6L0000099J1000@a-mtaout22.012.net.il> for 6784@debbugs.gnu.org; Tue, 03 Aug 2010 21:15:27 +0300 (IDT) Received: from HOME-C4E4A596F7 ([77.127.247.236]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0L6L00LN89DQYI40@a-mtaout22.012.net.il>; Tue, 03 Aug 2010 21:15:27 +0300 (IDT) Date: Tue, 03 Aug 2010 21:15:30 +0300 From: Eli Zaretskii In-reply-to: <87ocdj8tyh.fsf@telefonica.net> Message-id: <83ocdjy33x.fsf@gnu.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-transfer-encoding: QUOTED-PRINTABLE X-012-Sender: halo1@inter.net.il References: <87iq3radvf.fsf@telefonica.net> <83pqxzy5me.fsf@gnu.org> <87ocdj8tyh.fsf@telefonica.net> X-Spam-Score: -2.0 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.0 (--) > From: =C3=93scar Fuentes > Cc: 6784@debbugs.gnu.org > Date: Tue, 03 Aug 2010 19:52:22 +0200 >=20 > > For cmd.exe, the problem is a lesser one, but it still exists; e.= g., > > cmd.exe is limited to 4K long commands, while CreateProcess can h= andle > > 32K. >=20 > That's one more incosistency: a long command works fine, then you p= ut > that command as part of a pipe chain and it stops working. Perhaps we should bite the bullet and implement redirection and pipes within cmdproxy. From unknown Thu Aug 21 14:54:22 2025 X-Loop: help-debbugs@gnu.org Subject: bug#6784: 24.0.50; cmdproxy incosistency with command pathnames Resent-From: Laimonas =?UTF-8?Q?V=C4=97bra?= Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 03 Aug 2010 18:20:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6784 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: =?UTF-8?Q?=C3=93scar?= Fuentes Cc: 6784@debbugs.gnu.org Received: via spool by 6784-submit@debbugs.gnu.org id=B6784.128085954514521 (code B ref 6784); Tue, 03 Aug 2010 18:20:03 +0000 Received: (at 6784) by debbugs.gnu.org; 3 Aug 2010 18:19:05 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OgM4v-0003mA-5l for submit@debbugs.gnu.org; Tue, 03 Aug 2010 14:19:05 -0400 Received: from mail-ew0-f44.google.com ([209.85.215.44]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OgM4t-0003lo-PQ for 6784@debbugs.gnu.org; Tue, 03 Aug 2010 14:19:04 -0400 Received: by ewy22 with SMTP id 22so1649721ewy.3 for <6784@debbugs.gnu.org>; Tue, 03 Aug 2010 11:19:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=uciN7YBvsasfUb7MDslYYfJlc0nuMfLq8GsVACdLDPs=; b=W/bde4Is6nVhp8i9wAGVEjMdnXSvp0gjEUZMACqHkrB1ls32ZVslc9mxs7P3MrzoWY grR9utt53B3E/R1a22zkH9Y33ysru6ZKM2ggHfqBJc+rVydImi67PwmKRsJrWpirDoM3 E6/Ir+/aakq4lyPQnaQ9JeWV7kjR/CSbsJTbE= 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:content-type:content-transfer-encoding; b=tyaTCKVb1M+IQfLAtY+tpL+j+di9yNL/w2ehyBFmwNjNEX1wAwuQ5u4Mj52pj5oisw 8c62YG9fo+5qKyns330e4SOuA9LdMvWfaltmPzHfTIASLgtor6J+Qu0YUmZNPaCLIMQd 33uanRtplOpoMjYezXfFy7XiynQkK5+3OWI0I= Received: by 10.213.80.140 with SMTP id t12mr1190889ebk.27.1280859568742; Tue, 03 Aug 2010 11:19:28 -0700 (PDT) Received: from [192.168.1.72] (78-58-76-89.static.zebra.lt [78.58.76.89]) by mx.google.com with ESMTPS id z55sm11214578eeh.21.2010.08.03.11.19.26 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 03 Aug 2010 11:19:27 -0700 (PDT) Message-ID: <4C585DAB.5030609@gmail.com> Date: Tue, 03 Aug 2010 21:19:23 +0300 From: Laimonas =?UTF-8?Q?V=C4=97bra?= User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.11) Gecko/20100701 SeaMonkey/2.0.6 MIME-Version: 1.0 References: <87iq3radvf.fsf@telefonica.net> <83pqxzy5me.fsf@gnu.org> <87ocdj8tyh.fsf@telefonica.net> In-Reply-To: <87ocdj8tyh.fsf@telefonica.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Score: -3.1 (---) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.0 (---) Óscar Fuentes wrote: > That's one more incosistency: a long command works fine, then you put > that command as part of a pipe chain and it stops working. I guess the > current cmdproxy approach is the lesser evil. It's a CreateProcess() (in cmdproxy.c) _valid_ path requirement/problem; valid path/directory separator is (should be) '\': http://msdn.microsoft.com/en-us/library/aa365247(VS.85).aspx (only File I/O API converts '/' to '\') p.s. cmd.exe /c accepts both variants. From unknown Thu Aug 21 14:54:22 2025 X-Loop: help-debbugs@gnu.org Subject: bug#6784: 24.0.50; cmdproxy incosistency with command pathnames Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 03 Aug 2010 19:28:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6784 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Laimonas =?UTF-8?Q?V=C4=97bra?= Cc: ofv@wanadoo.es, 6784@debbugs.gnu.org Reply-To: Eli Zaretskii Received: via spool by 6784-submit@debbugs.gnu.org id=B6784.128086367516530 (code B ref 6784); Tue, 03 Aug 2010 19:28:01 +0000 Received: (at 6784) by debbugs.gnu.org; 3 Aug 2010 19:27:55 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OgN9X-0004IZ-DB for submit@debbugs.gnu.org; Tue, 03 Aug 2010 15:27:55 -0400 Received: from mtaout20.012.net.il ([80.179.55.166]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OgN9V-0004IU-J8 for 6784@debbugs.gnu.org; Tue, 03 Aug 2010 15:27:54 -0400 Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0L6L00700C5KQ600@a-mtaout20.012.net.il> for 6784@debbugs.gnu.org; Tue, 03 Aug 2010 22:28:19 +0300 (IDT) Received: from HOME-C4E4A596F7 ([77.127.247.236]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0L6L003KRCR68AH0@a-mtaout20.012.net.il>; Tue, 03 Aug 2010 22:28:19 +0300 (IDT) Date: Tue, 03 Aug 2010 22:28:22 +0300 From: Eli Zaretskii In-reply-to: <4C585DAB.5030609@gmail.com> Message-id: <83mxt3xzqh.fsf@gnu.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-transfer-encoding: QUOTED-PRINTABLE X-012-Sender: halo1@inter.net.il References: <87iq3radvf.fsf@telefonica.net> <83pqxzy5me.fsf@gnu.org> <87ocdj8tyh.fsf@telefonica.net> <4C585DAB.5030609@gmail.com> X-Spam-Score: -2.0 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.0 (--) > From: Laimonas V=C4=97bra > Cc: 6784@debbugs.gnu.org >=20 > =C3=93scar Fuentes wrote: >=20 > > That's one more incosistency: a long command works fine, then you= put > > that command as part of a pipe chain and it stops working. I gues= s the > > current cmdproxy approach is the lesser evil. >=20 > It's a CreateProcess() (in cmdproxy.c) _valid_ path requirement/pro= blem;=20 > valid path/directory separator is (should be) '\': But the name of the shell, which is the only file name CreateProcess should care about in this case, _is_ converted to use backslashes: progname =3D getenv ("COMSPEC"); if (!progname) =09fail ("error: COMSPEC is not set\n"); canon_filename (progname); And canon_filename is char * canon_filename (char *fname) { char *p =3D fname; while (*p) =09{ =09 if (*p =3D=3D '/') =09 *p =3D '\\'; =09 p++; =09} return fname; } From unknown Thu Aug 21 14:54:22 2025 X-Loop: help-debbugs@gnu.org Subject: bug#6784: 24.0.50; cmdproxy incosistency with command pathnames Resent-From: Laimonas =?UTF-8?Q?V=C4=97bra?= Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 03 Aug 2010 20:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6784 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii , 6784@debbugs.gnu.org Received: via spool by 6784-submit@debbugs.gnu.org id=B6784.128086651117819 (code B ref 6784); Tue, 03 Aug 2010 20:16:02 +0000 Received: (at 6784) by debbugs.gnu.org; 3 Aug 2010 20:15:11 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OgNtH-0004dM-1F for submit@debbugs.gnu.org; Tue, 03 Aug 2010 16:15:11 -0400 Received: from mail-ey0-f172.google.com ([209.85.215.172]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OgNtF-0004dG-8H for 6784@debbugs.gnu.org; Tue, 03 Aug 2010 16:15:10 -0400 Received: by eyb7 with SMTP id 7so1668989eyb.3 for <6784@debbugs.gnu.org>; Tue, 03 Aug 2010 13:15:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=iaisXN6tWakBCicm+1e/Ujx5uPsUaR/4Lz2wTVXYBIs=; b=vmA4XsVNEQlzg6kuhzaOyKL5rXAAnnFFUINw1StyM4DMXhlHndHFjFVh8eiUYDaHDT W1e1bgIs9D1oIyMSYbFmxOyKLNgvPKZLuhGWFC7b2C201S9BavGOkiq5IRWl/elIZ2PW z9PDX3hsNBguyGVtr7Zgg094tKBI/PvkpyGT0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; b=C0ehBR6eZHdbI3pdlNM/kz8Kn2AiTOLP7QzM88B5QNWIU/Fdt7YrhMvGD6cDfSbMBW 1+sX9CBkhlu7ZldIuXrJQ8KdzHgAxZOPpSPS8OdBlhjhe21Trg3q5dNJbcn0Lf+ySw8n djzXxcXzVW+PB73ZZoNgx07g1W/ifWZ2dYBYc= Received: by 10.213.25.145 with SMTP id z17mr1269843ebb.84.1280866535297; Tue, 03 Aug 2010 13:15:35 -0700 (PDT) Received: from [192.168.1.72] (78-58-76-89.static.zebra.lt [78.58.76.89]) by mx.google.com with ESMTPS id u9sm5414711eeh.5.2010.08.03.13.15.33 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 03 Aug 2010 13:15:34 -0700 (PDT) Message-ID: <4C5878E2.1020402@gmail.com> Date: Tue, 03 Aug 2010 23:15:30 +0300 From: Laimonas =?UTF-8?Q?V=C4=97bra?= User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.11) Gecko/20100701 SeaMonkey/2.0.6 MIME-Version: 1.0 References: <87iq3radvf.fsf@telefonica.net> <83pqxzy5me.fsf@gnu.org> <87ocdj8tyh.fsf@telefonica.net> <4C585DAB.5030609@gmail.com> <83mxt3xzqh.fsf@gnu.org> In-Reply-To: <83mxt3xzqh.fsf@gnu.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Score: -2.9 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.9 (--) Eli Zaretskii wrote: >> From: Laimonas Vėbra >> Cc: 6784@debbugs.gnu.org >> >> Óscar Fuentes wrote: >> >>> That's one more incosistency: a long command works fine, then you put >>> that command as part of a pipe chain and it stops working. I guess the >>> current cmdproxy approach is the lesser evil. >> >> It's a CreateProcess() (in cmdproxy.c) _valid_ path requirement/problem; >> valid path/directory separator is (should be) '\': > > But the name of the shell, which is the only file name CreateProcess > should care about in this case, _is_ converted to use backslashes: The problem is poor CreateProcess() description and some flawless aspects. Why do we have to call CreateProcess like this: rv = CreateProcess (progname, cmdline, &sec_attrs, NULL, TRUE, 0, envblock, dir, &si, &child); where progname is 'cmd.exe' and cmdline is 'cmd.exe /c command' Somewhere i read, that this way it just works (with less problems). The problem doesn't occur, when we call CreateProcess() like this: CreateProcess ('C:\cygwin\bin\ls.exe', 'C:/cygwin/bin/ls.exe'...) That's actually the case when we are not invoking a shell (command without pipe or redirection), e.g.: M-x grep c:/cygwin/bin/ls Then progname gets correctly backslashed by: if (!get_next_token (path, &args)) canon_filename (path); progname = make_absolute (path); My guess is that in this case CreateProcess() takes correctly backslashed progname (LPCTSTR lpApplicationName), as the executable module name (program name), _ignores_ first token of cmdline (LPTSTR lpCommandLine) as it is internally treated to be the same executable module name (although with wrong slashes) and takes/passes remaining tokens of cmdline as command line args of progname. Actual bug problem arises/occurs, then we are invoking a shell (e.g. c:/cygwin/bin/ls | grep foo); then CreateProcess() gets likes this: CreateProcess('C:\WINDOWS\system32\cmd.exe', '"C:\WINDOWS\system32\cmd.exe" /c c:/cygwin/bin/ls | grep foo'...) I guess, that CreateProcess(), in this case, internally processes command line args, i.e. program names/paths ('c:/cygwin/bin/ls', 'grep'), that it passes to cmd.exe and because command name/path is not correctly/appropriately constructed (should be backslashed), it (chain CreateProcess()->cmd.exe) fails. From unknown Thu Aug 21 14:54:22 2025 X-Loop: help-debbugs@gnu.org Subject: bug#6784: 24.0.50; cmdproxy incosistency with command pathnames Resent-From: Laimonas =?UTF-8?Q?V=C4=97bra?= Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 03 Aug 2010 20:57:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6784 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 6784@debbugs.gnu.org Received: via spool by 6784-submit@debbugs.gnu.org id=B6784.128086901719006 (code B ref 6784); Tue, 03 Aug 2010 20:57:02 +0000 Received: (at 6784) by debbugs.gnu.org; 3 Aug 2010 20:56:57 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OgOXf-0004wU-Gw for submit@debbugs.gnu.org; Tue, 03 Aug 2010 16:56:57 -0400 Received: from mail-ew0-f44.google.com ([209.85.215.44]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OgOXd-0004wO-TL for 6784@debbugs.gnu.org; Tue, 03 Aug 2010 16:56:54 -0400 Received: by ewy22 with SMTP id 22so1701443ewy.3 for <6784@debbugs.gnu.org>; Tue, 03 Aug 2010 13:57:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=1IlGbhiEK8tZOFGngITz1JXpMXpaX69xXWHHxMYP6WU=; b=D4JpupplYyzzRCYQqpY4Q9oNOBIrJGvuV2xeCPUCAqp3IdYcLfSaYhewrHQ0NEGBRX 805SztGmmycBqpyfkKBhPiuOvlNZmayCupxBpRfDv+LQ2kNu/1Rm8ATxVSsFJz5Y75aN juiXSWxCbj8Yxu+Bfv/YIf/SaYVp46k/1jKOM= 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:content-type:content-transfer-encoding; b=iKO5nfCHM+3KolbUw+qVfOYRNzAEfYrQx3db8cdxZxCX9gMQAcgVi6RRaB4RB7B0eL 1HBZlyTI4OGir3Zu8Eqjjo2CPX4EtGb88mBVK/JqvZnXr0mjgTW1lICaYCY+vLKcpn+q S5Cv6IC1/NnuI2v1nI1sq5HST72wLBTd6FWEk= Received: by 10.14.127.3 with SMTP id c3mr2478866eei.70.1280869040036; Tue, 03 Aug 2010 13:57:20 -0700 (PDT) Received: from [192.168.1.72] (78-58-76-89.static.zebra.lt [78.58.76.89]) by mx.google.com with ESMTPS id v8sm11450741eeh.14.2010.08.03.13.57.18 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 03 Aug 2010 13:57:19 -0700 (PDT) Message-ID: <4C5882AC.5050201@gmail.com> Date: Tue, 03 Aug 2010 23:57:16 +0300 From: Laimonas =?UTF-8?Q?V=C4=97bra?= User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.11) Gecko/20100701 SeaMonkey/2.0.6 MIME-Version: 1.0 References: <87iq3radvf.fsf@telefonica.net> <83pqxzy5me.fsf@gnu.org> <87ocdj8tyh.fsf@telefonica.net> <4C585DAB.5030609@gmail.com> <83mxt3xzqh.fsf@gnu.org> <4C5878E2.1020402@gmail.com> In-Reply-To: <4C5878E2.1020402@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Score: -2.9 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.8 (--) Laimonas Vėbra wrote: > I guess, that CreateProcess(), in this case, internally processes > command line args, i.e. program names/paths ('c:/cygwin/bin/ls', > 'grep'), that it passes to cmd.exe and because command name/path is not > correctly/appropriately constructed (should be backslashed), it (chain > CreateProcess()->cmd.exe) fails. Wrong. Actually it's cmd.exe that fails if command string contains pipe and (subsequent slashed, not backslashed) program names are not quoted. Works: cmd.exe /c c:/cygwin/bin/ls | grep foo cmd.exe /c c:/cygwin/bin/ls | C:\cygwin\bin\grep foo cmd.exe /c c:/cygwin/bin/ls | "C:/cygwin/bin/grep" foo cmd.exe /c "c:/cygwin/bin/ls" | "C:/cygwin/bin/grep" foo Fails: cmd.exe /c c:/cygwin/bin/ls | C:/cygwin/bin/grep foo So it could be fixed in two ways: 1. using windows path naming rules when calling CreateProcess() 2. quoting program names (all or if it contains slashes '/', i.e. is not backslashed) args when calling CreateProcess() I'm not sure which one would be easier and more error prone. From unknown Thu Aug 21 14:54:22 2025 X-Loop: help-debbugs@gnu.org Subject: bug#6784: 24.0.50; cmdproxy incosistency with command pathnames Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 04 Aug 2010 03:09:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6784 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Laimonas =?UTF-8?Q?V=C4=97bra?= Cc: 6784@debbugs.gnu.org Reply-To: Eli Zaretskii Received: via spool by 6784-submit@debbugs.gnu.org id=B6784.12808913125923 (code B ref 6784); Wed, 04 Aug 2010 03:09:02 +0000 Received: (at 6784) by debbugs.gnu.org; 4 Aug 2010 03:08:32 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OgULI-0001XU-DX for submit@debbugs.gnu.org; Tue, 03 Aug 2010 23:08:32 -0400 Received: from mtaout22.012.net.il ([80.179.55.172]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OgULF-0001XP-KC for 6784@debbugs.gnu.org; Tue, 03 Aug 2010 23:08:31 -0400 Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0L6L00I00XQUC700@a-mtaout22.012.net.il> for 6784@debbugs.gnu.org; Wed, 04 Aug 2010 06:08:22 +0300 (IDT) Received: from HOME-C4E4A596F7 ([77.126.102.143]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0L6L00ENXY1X51E0@a-mtaout22.012.net.il>; Wed, 04 Aug 2010 06:08:22 +0300 (IDT) Date: Wed, 04 Aug 2010 06:08:25 +0300 From: Eli Zaretskii In-reply-to: <4C5882AC.5050201@gmail.com> Message-id: <83k4o7xefq.fsf@gnu.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-transfer-encoding: QUOTED-PRINTABLE X-012-Sender: halo1@inter.net.il References: <87iq3radvf.fsf@telefonica.net> <83pqxzy5me.fsf@gnu.org> <87ocdj8tyh.fsf@telefonica.net> <4C585DAB.5030609@gmail.com> <83mxt3xzqh.fsf@gnu.org> <4C5878E2.1020402@gmail.com> <4C5882AC.5050201@gmail.com> X-Spam-Score: -1.9 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) > Date: Tue, 03 Aug 2010 23:57:16 +0300 > From: Laimonas V=C4=97bra > CC: 6784@debbugs.gnu.org >=20 > Laimonas V=C4=97bra wrote: >=20 > > I guess, that CreateProcess(), in this case, internally processes > > command line args, i.e. program names/paths ('c:/cygwin/bin/ls', > > 'grep'), that it passes to cmd.exe and because command name/path = is not > > correctly/appropriately constructed (should be backslashed), it (= chain > > CreateProcess()->cmd.exe) fails. >=20 > Wrong. Actually it's cmd.exe that fails if command string contains = pipe=20 > and (subsequent slashed, not backslashed) program names are not quo= ted. >=20 > Works: > cmd.exe /c c:/cygwin/bin/ls | grep foo > cmd.exe /c c:/cygwin/bin/ls | C:\cygwin\bin\grep foo > cmd.exe /c c:/cygwin/bin/ls | "C:/cygwin/bin/grep" foo > cmd.exe /c "c:/cygwin/bin/ls" | "C:/cygwin/bin/grep" foo >=20 > Fails: > cmd.exe /c c:/cygwin/bin/ls | C:/cygwin/bin/grep foo In the case in point, the problem was with the executable _before_ the pipe. From unknown Thu Aug 21 14:54:22 2025 X-Loop: help-debbugs@gnu.org Subject: bug#6784: 24.0.50; cmdproxy incosistency with command pathnames Resent-From: Laimonas =?UTF-8?Q?V=C4=97bra?= Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 04 Aug 2010 10:29:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6784 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 6784@debbugs.gnu.org Received: via spool by 6784-submit@debbugs.gnu.org id=B6784.128091771817551 (code B ref 6784); Wed, 04 Aug 2010 10:29:02 +0000 Received: (at 6784) by debbugs.gnu.org; 4 Aug 2010 10:28:38 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OgbDC-0004Z0-5J for submit@debbugs.gnu.org; Wed, 04 Aug 2010 06:28:38 -0400 Received: from mail-ey0-f172.google.com ([209.85.215.172]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OgbDA-0004Yv-2L for 6784@debbugs.gnu.org; Wed, 04 Aug 2010 06:28:36 -0400 Received: by eyb7 with SMTP id 7so1801191eyb.3 for <6784@debbugs.gnu.org>; Wed, 04 Aug 2010 03:29:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=bDd2BhrJcbLMmyld7aYLZ/dg6xPCsd3BzQv6osQoJYE=; b=Yk8xp2Ncmlr8GskVHoRw080OyVRlqStlGoTgQjzmav9DtgNS3UEbROHog77pLjG3Iz Wum9xFqfDO0GjXnrMCQHcqPiYSRPD4lZNYC7hAHNKlSbUZKn+p/qCPeBY8u0DgR6YfHC BmCgW3otobhacREX3VMgYCs6Vnzux/LpIctgw= 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:content-type:content-transfer-encoding; b=ozsKTZrgysFIklL/3K3G8bOBfQxGtCCo4zC9Xl7HlO7QIJ2EbBbeUcBEJFuAvkwcjR NLLGf82Yw89pJ8cp7T3A5C6Zw+p65pjVLs9tVoPiVsTU0bBwSZdh+G2WscYKgt+HDhUB YWYwI5+GDDttTgBRnGemEkFybaVWTpqWIQVeQ= Received: by 10.14.121.141 with SMTP id r13mr3594992eeh.47.1280917743538; Wed, 04 Aug 2010 03:29:03 -0700 (PDT) Received: from [192.168.1.72] (78-58-76-89.static.zebra.lt [78.58.76.89]) by mx.google.com with ESMTPS id a48sm12526770eei.1.2010.08.04.03.29.02 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 04 Aug 2010 03:29:02 -0700 (PDT) Message-ID: <4C5940EA.7030301@gmail.com> Date: Wed, 04 Aug 2010 13:28:58 +0300 From: Laimonas =?UTF-8?Q?V=C4=97bra?= User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.11) Gecko/20100701 SeaMonkey/2.0.6 MIME-Version: 1.0 References: <87iq3radvf.fsf@telefonica.net> <83pqxzy5me.fsf@gnu.org> <87ocdj8tyh.fsf@telefonica.net> <4C585DAB.5030609@gmail.com> <83mxt3xzqh.fsf@gnu.org> <4C5878E2.1020402@gmail.com> <4C5882AC.5050201@gmail.com> <83k4o7xefq.fsf@gnu.org> In-Reply-To: <83k4o7xefq.fsf@gnu.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Score: -2.8 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.8 (--) Eli Zaretskii wrote: >> Laimonas Vėbra wrote: >> >>> <...> >> >> Works: >> cmd.exe /c c:/cygwin/bin/ls | grep foo >> cmd.exe /c c:/cygwin/bin/ls | C:\cygwin\bin\grep foo >> cmd.exe /c c:/cygwin/bin/ls | "C:/cygwin/bin/grep" foo >> cmd.exe /c "c:/cygwin/bin/ls" | "C:/cygwin/bin/grep" foo >> >> Fails: >> cmd.exe /c c:/cygwin/bin/ls | C:/cygwin/bin/grep foo > In the case in point, the problem was with the executable _before_ > the pipe. Or with subsequent _slashed_ _and_ _unquoted_ executable(s). Quote whole command line (with slashed programs/paths single quoted): M-x shell-command ""c:/cygwin/bin/ls" | grep foo" M-x shell-command ""c:/cygwin/bin/ls" | "c:/cygwin/bin/grep" foo" or: cmdproxy -c """c:/cygwin/bin/ls" | grep o"" cmdproxy -c """c:/cygwin/bin/ls" | "c:/cygwin/bin/grep" o"" and it _works_. cmd /?: If /C or /K is specified, then the remainder of the command line after the switch is processed as a command line, where the following logic is used to process quote (") characters: 1. If all of the following conditions are met, then quote characters on the command line are preserved: - no /S switch - exactly two quote characters - no special characters between the two quote characters, where special is one of: &<>()@^| - there are one or more whitespace characters between the the two quote characters - the string between the two quote characters is the name of an executable file. 2. Otherwise, old behavior is to see if the first character is a quote character and if so, strip the leading character and remove the last quote character on the command line, preserving any text after the last quote character. From unknown Thu Aug 21 14:54:22 2025 X-Loop: help-debbugs@gnu.org Subject: bug#6784: bug#7785: rgrep is broken on woe32 Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 06 Jan 2011 12:03:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6784 X-GNU-PR-Package: emacs,w32 X-GNU-PR-Keywords: To: Sam Steingold Cc: ofv@wanadoo.es, 7785@debbugs.gnu.org, 6784@debbugs.gnu.org Reply-To: Eli Zaretskii Received: via spool by 6784-submit@debbugs.gnu.org id=B6784.129431532526603 (code B ref 6784); Thu, 06 Jan 2011 12:03:02 +0000 Received: (at 6784) by debbugs.gnu.org; 6 Jan 2011 12:02:05 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PaoXc-0006uy-VB for submit@debbugs.gnu.org; Thu, 06 Jan 2011 07:02:05 -0500 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PaoXZ-0006uP-A9; Thu, 06 Jan 2011 07:02:01 -0500 Received: from eliz by fencepost.gnu.org with local (Exim 4.69) (envelope-from ) id 1PaoeU-0001fV-Rz; Thu, 06 Jan 2011 07:09:10 -0500 From: Eli Zaretskii In-reply-to: (message from Sam Steingold on Wed, 5 Jan 2011 17:43:15 -0500) References: <87d3oc17oo.fsf@telefonica.net> <87k4ijxeh2.fsf@wanadoo.es> <874o9nx9vx.fsf@wanadoo.es> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Message-Id: Date: Thu, 06 Jan 2011 07:09:10 -0500 X-Spam-Score: -6.5 (------) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.5 (------) > X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, > RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST,T_DKIM_INVALID autolearn=ham version=3.3.1 > Date: Wed, 5 Jan 2011 17:43:15 -0500 > From: Sam Steingold > Cc: Eli Zaretskii , 7785@debbugs.gnu.org > > On Wed, Jan 5, 2011 at 5:29 PM, Óscar Fuentes wrote: > > > > Maybe it is related to this: > > > > http://debbugs.gnu.org/cgi/bugreport.cgi?bug=6784 > > > > definitely. is that bug going to be fixed? The discussions in that bug report concluded that the program file name after the pipe needs to be quoted, in order for it to work with file names that use forward- and back-slashes alike. I can solve that problem for rgrep (and for other similar commands) by tweaking the templates used by grep.el, so as to quote the %s after the pipe character `|'. Would that be an okay solution? The other alternative I thought about, to fix this inside cmdproxy, has a disadvantage that the command semantics cannot be easily determined at such a low level. The first word after the `|' might not always be a name of an executable file, or it could already be quoted in some ingenious ways, or it might be a part of a quoted pipe that is intended to survive unaltered, to be passed to some other program and not executed as a shell pipeline. Even if we teach cmdproxy about all of these use-cases and write/debug code to handle each and every one of them, we will certainly miss some. We will also force this quoting on commands typed interactively, so users lose the fire escape they can use now to quote or not to quote. As a general principle, I believe that the level which conses the command line is where such decision should be made, because that level surely knows the context, and knows _exactly_ where are the parts that need quoting. The disadvantage is, of course, that similar solutions will have to be implemented for each Emacs command that launches a shell pipeline. But I don't believe there are many of those. Comments? From unknown Thu Aug 21 14:54:22 2025 X-Loop: help-debbugs@gnu.org Subject: bug#6784: bug#7785: rgrep is broken on woe32 Resent-From: Sam Steingold Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 06 Jan 2011 15:19:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6784 X-GNU-PR-Package: emacs,w32 X-GNU-PR-Keywords: To: Eli Zaretskii Cc: ofv@wanadoo.es, 7785@debbugs.gnu.org, 6784@debbugs.gnu.org Received: via spool by 6784-submit@debbugs.gnu.org id=B6784.129432711113569 (code B ref 6784); Thu, 06 Jan 2011 15:19:02 +0000 Received: (at 6784) by debbugs.gnu.org; 6 Jan 2011 15:18:31 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Parbi-0003Wm-EC for submit@debbugs.gnu.org; Thu, 06 Jan 2011 10:18:30 -0500 Received: from mail-ew0-f44.google.com ([209.85.215.44]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Parbg-0003WR-7W; Thu, 06 Jan 2011 10:18:28 -0500 Received: by ewy8 with SMTP id 8so7756649ewy.3 for ; Thu, 06 Jan 2011 07:25:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=mFT9pGqIW7LhT5xGOc3YdZpD/QKqRGfyUJLNWKuhW4Y=; b=Gz2ymIlNoWHj61Pano5qUZuW9w38T/lg6ZNBuHbw1SSDh+Gx8MojeP2ReNBX4thR9M 0Ay2LgrYbUiylVCTY3k6Ew9zEb10hIUsUezfsBetHLfwjZlxPpPUDnitsN6uvXXL8rlZ 4zgwOloCGUjaypLAMrWXJYCBV7WEq38yuM830= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=itEEFOD15rP+t4N1ZMe+KdewRoG8hpHnVyk6+MUJV2MU90fxxPj04nvSW4z0Ld0Poh UCEeQ6kRijgV4S0Fz8/elZERDTt3PY4Z5khqlmiJe2XI9rMrlUDmI7TAYQoQPGG3fjd1 ngnRPwPgmHPURQpU9OaerjNRdGZTdhFlKOgDM= MIME-Version: 1.0 Received: by 10.14.126.141 with SMTP id b13mr1097092eei.47.1294327542210; Thu, 06 Jan 2011 07:25:42 -0800 (PST) Received: by 10.14.127.207 with HTTP; Thu, 6 Jan 2011 07:25:42 -0800 (PST) In-Reply-To: References: <87d3oc17oo.fsf@telefonica.net> <87k4ijxeh2.fsf@wanadoo.es> <874o9nx9vx.fsf@wanadoo.es> Date: Thu, 6 Jan 2011 10:25:42 -0500 X-Google-Sender-Auth: 9Dbif_tGi1nc4JlksJXHYTtlff0 Message-ID: From: Sam Steingold Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -3.9 (---) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.9 (---) On Thu, Jan 6, 2011 at 7:09 AM, Eli Zaretskii wrote: >> Date: Wed, 5 Jan 2011 17:43:15 -0500 >> From: Sam Steingold >> Cc: Eli Zaretskii , 7785@debbugs.gnu.org >> >> On Wed, Jan 5, 2011 at 5:29 PM, =C3=93scar Fuentes wrot= e: >> > http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D6784 >> definitely. is that bug going to be fixed? > ... Would that be an okay solution? any solution which fixes my problem is OK :-) > Comments? the problems you describe seem to boil down to re-implementing cmd in cmdpr= oxy. this begs the question, why does emacs have to provide cmdproxy? why not use cmd provided by windows? --=20 Sam Steingold From unknown Thu Aug 21 14:54:22 2025 X-Loop: help-debbugs@gnu.org Subject: bug#6784: bug#7785: rgrep is broken on woe32 Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 06 Jan 2011 16:01:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6784 X-GNU-PR-Package: emacs,w32 X-GNU-PR-Keywords: To: Sam Steingold Cc: ofv@wanadoo.es, 7785@debbugs.gnu.org, 6784@debbugs.gnu.org Reply-To: Eli Zaretskii Received: via spool by 6784-submit@debbugs.gnu.org id=B6784.129432960919210 (code B ref 6784); Thu, 06 Jan 2011 16:01:02 +0000 Received: (at 6784) by debbugs.gnu.org; 6 Jan 2011 16:00:09 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PasG1-0004zb-Ea for submit@debbugs.gnu.org; Thu, 06 Jan 2011 11:00:09 -0500 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PasFu-0004ya-Iq; Thu, 06 Jan 2011 11:00:02 -0500 Received: from eliz by fencepost.gnu.org with local (Exim 4.69) (envelope-from ) id 1PasMr-000525-Rz; Thu, 06 Jan 2011 11:07:13 -0500 From: Eli Zaretskii In-reply-to: (message from Sam Steingold on Thu, 6 Jan 2011 10:25:42 -0500) References: <87d3oc17oo.fsf@telefonica.net> <87k4ijxeh2.fsf@wanadoo.es> <874o9nx9vx.fsf@wanadoo.es> Message-Id: Date: Thu, 06 Jan 2011 11:07:13 -0500 X-Spam-Score: -6.5 (------) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.5 (------) > Date: Thu, 6 Jan 2011 10:25:42 -0500 > From: Sam Steingold > Cc: ofv@wanadoo.es, 7785@debbugs.gnu.org, 6784@debbugs.gnu.org > > the problems you describe seem to boil down to re-implementing cmd in cmdproxy. > this begs the question, why does emacs have to provide cmdproxy? > why not use cmd provided by windows? cmdproxy does not reimplement cmd. It is really just a proxy to cmd, designed to fix a few idiosyncrasies, and that's it. When cmdproxy concludes that a shell is needed, it invokes cmd (or some other shell). This part of the commentary at the beginning of cmdproxy.c should tell the story: Accepts subset of Unix sh(1) command-line options, for compatibility with elisp code written for Unix. When possible, executes external programs directly (a common use of /bin/sh by Emacs), otherwise invokes the user-specified command processor to handle built-in shell commands, batch files and interactive mode. The main function is simply to process the "-c string" option in the way /bin/sh does, since the standard Windows command shells use the convention that everything after "/c" (the Windows equivalent of "-c") is the input string. From unknown Thu Aug 21 14:54:22 2025 X-Loop: help-debbugs@gnu.org Subject: bug#6784: bug#7785: rgrep is broken on woe32 Resent-From: Chong Yidong Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 08 Jan 2011 20:54:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6784 X-GNU-PR-Package: emacs,w32 X-GNU-PR-Keywords: To: Eli Zaretskii Cc: ofv@wanadoo.es, 7785@debbugs.gnu.org, Sam Steingold , 6784@debbugs.gnu.org Received: via spool by 6784-submit@debbugs.gnu.org id=B6784.129452000911317 (code B ref 6784); Sat, 08 Jan 2011 20:54:02 +0000 Received: (at 6784) by debbugs.gnu.org; 8 Jan 2011 20:53:29 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Pbfmy-0002wR-W5 for submit@debbugs.gnu.org; Sat, 08 Jan 2011 15:53:29 -0500 Received: from vm-emlprdomr-05.its.yale.edu ([130.132.50.146]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Pbfmv-0002w8-EV; Sat, 08 Jan 2011 15:53:26 -0500 Received: from furball (c-71-192-165-84.hsd1.ct.comcast.net [71.192.165.84]) (authenticated bits=0) by vm-emlprdomr-05.its.yale.edu (8.14.4/8.14.4) with ESMTP id p08L0iVO018583 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Sat, 8 Jan 2011 16:00:44 -0500 Received: by furball (Postfix, from userid 1000) id E9A58161EAC; Sat, 8 Jan 2011 16:00:43 -0500 (EST) From: Chong Yidong References: <87d3oc17oo.fsf@telefonica.net> <87k4ijxeh2.fsf@wanadoo.es> <874o9nx9vx.fsf@wanadoo.es> Date: Sat, 08 Jan 2011 16:00:43 -0500 In-Reply-To: (Eli Zaretskii's message of "Thu, 06 Jan 2011 07:09:10 -0500") Message-ID: <87mxnbkt50.fsf@stupidchicken.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Scanned-By: MIMEDefang 2.71 on 130.132.50.146 X-Spam-Score: -2.8 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.8 (--) Eli Zaretskii writes: > The discussions in that bug report concluded that the program file > name after the pipe needs to be quoted, in order for it to work with > file names that use forward- and back-slashes alike. I can solve that > problem for rgrep (and for other similar commands) by tweaking the > templates used by grep.el, so as to quote the %s after the pipe > character `|'. Would that be an okay solution? I think this is an acceptable solution, and agree that changing cmdproxy to handle this intelligently sounds like a nightmare. > The disadvantage is, of course, that similar solutions will have to be > implemented for each Emacs command that launches a shell pipeline. Let's just fix these individually as the problems are reported. From unknown Thu Aug 21 14:54:22 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.427 (Entity 5.427) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: =?UTF-8?Q?=C3=93scar?= Fuentes Subject: bug#6784: closed (Re: bug#6784: bug#7785: rgrep is broken on woe32) Message-ID: References: <83ipxyj6ub.fsf@gnu.org> <87iq3radvf.fsf@telefonica.net> X-Gnu-PR-Message: they-closed 6784 X-Gnu-PR-Package: emacs,w32 Reply-To: 6784@debbugs.gnu.org Date: Sun, 09 Jan 2011 17:54:03 +0000 Content-Type: multipart/mixed; boundary="----------=_1294595643-1202-1" This is a multi-part message in MIME format... ------------=_1294595643-1202-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #6784: 24.0.50; cmdproxy incosistency with command pathnames which was filed against the emacs,w32 package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 6784@debbugs.gnu.org. --=20 6784: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D6784 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1294595643-1202-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 6784-done) by debbugs.gnu.org; 9 Jan 2011 17:53:21 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PbzSC-0000IQ-PT for submit@debbugs.gnu.org; Sun, 09 Jan 2011 12:53:21 -0500 Received: from mtaout20.012.net.il ([80.179.55.166]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PbzS9-0000IA-OD; Sun, 09 Jan 2011 12:53:19 -0500 Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0LER00400O9V2X00@a-mtaout20.012.net.il>; Sun, 09 Jan 2011 19:59:57 +0200 (IST) Received: from HOME-C4E4A596F7 ([77.127.131.253]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0LER00389ONUGX70@a-mtaout20.012.net.il>; Sun, 09 Jan 2011 19:59:56 +0200 (IST) Date: Sun, 09 Jan 2011 19:59:56 +0200 From: Eli Zaretskii Subject: Re: bug#6784: bug#7785: rgrep is broken on woe32 In-reply-to: <87mxnbkt50.fsf@stupidchicken.com> X-012-Sender: halo1@inter.net.il To: Chong Yidong , Michael Albinus Message-id: <83ipxyj6ub.fsf@gnu.org> References: <87d3oc17oo.fsf@telefonica.net> <87k4ijxeh2.fsf@wanadoo.es> <874o9nx9vx.fsf@wanadoo.es> <87mxnbkt50.fsf@stupidchicken.com> X-Spam-Score: -2.0 (--) X-Debbugs-Envelope-To: 6784-done Cc: ofv@wanadoo.es, 7785@debbugs.gnu.org, sds@gnu.org, 6784-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.0 (--) > From: Chong Yidong > Cc: Sam Steingold , 7785@debbugs.gnu.org, 6784@debbugs.gnu.org > Date: Sat, 08 Jan 2011 16:00:43 -0500 > > Eli Zaretskii writes: > > > The discussions in that bug report concluded that the program file > > name after the pipe needs to be quoted, in order for it to work with > > file names that use forward- and back-slashes alike. I can solve that > > problem for rgrep (and for other similar commands) by tweaking the > > templates used by grep.el, so as to quote the %s after the pipe > > character `|'. Would that be an okay solution? > > I think this is an acceptable solution, and agree that changing cmdproxy > to handle this intelligently sounds like a nightmare. Okay, fixed in grep.el (revno 100367 on the emacs-23 branch). > > The disadvantage is, of course, that similar solutions will have to be > > implemented for each Emacs command that launches a shell pipeline. > > Let's just fix these individually as the problems are reported. I found only 2 more instances of this that need to be fixed. One of them is in jka-compr.el, where it calls `dd' in a pipe. I fixed that one. The other one is in tramp.el, which uses shell pipelines a lot; however, the only ones that need to be fixed are those that invoke _local_ programs, not remote programs, as the latter will not be on a Windows machine. Michael, could you please take care of that (on the emacs-23 branch)? I gather that you have your master repository, so doing it from there would be less hassle for you, and you know the semantics of each pipeline better than I do. Thanks. ------------=_1294595643-1202-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 3 Aug 2010 15:56:50 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OgJrG-0002m7-BG for submit@debbugs.gnu.org; Tue, 03 Aug 2010 11:56:50 -0400 Received: from mx10.gnu.org ([199.232.76.166]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OgJrD-0002m1-Kb for submit@debbugs.gnu.org; Tue, 03 Aug 2010 11:56:48 -0400 Received: from lists.gnu.org ([199.232.76.165]:33172) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1OgJrd-0008U4-Vt for submit@debbugs.gnu.org; Tue, 03 Aug 2010 11:57:14 -0400 Received: from [140.186.70.92] (port=40439 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OgJrc-0001OB-2Q for bug-gnu-emacs@gnu.org; Tue, 03 Aug 2010 11:57:13 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,T_RP_MATCHES_RCVD,T_TO_NO_BRKTS_FREEMAIL autolearn=unavailable version=3.3.1 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OgJrW-0000cI-Ov for bug-gnu-emacs@gnu.org; Tue, 03 Aug 2010 11:57:11 -0400 Received: from impaqm4.telefonica.net ([213.4.138.4]:49716) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OgJrW-0000bl-JI for bug-gnu-emacs@gnu.org; Tue, 03 Aug 2010 11:57:06 -0400 Received: from IMPmailhost2.adm.correo ([10.20.102.39]) by IMPaqm4.telefonica.net with bizsmtp id ppbl1e00L0r0BT63QrwtCs; Tue, 03 Aug 2010 17:56:53 +0200 Received: from qcore ([83.42.13.171]) by IMPmailhost2.adm.correo with BIZ IMP id prws1e00L3hRxRf1irwtUQ; Tue, 03 Aug 2010 17:56:53 +0200 X-Brightmail-Tracker: AAAAAA== X-TE-authinfo: authemail="981711563$telefonica.net" |auth_email="981711563@telefonica.net" X-TE-AcuTerraCos: auth_cuTerraCos="cosuitnetc01" From: =?utf-8?Q?=C3=93scar_Fuentes?= To: bug-gnu-emacs@gnu.org Subject: 24.0.50; cmdproxy incosistency with command pathnames Date: Tue, 03 Aug 2010 17:56:52 +0200 Message-ID: <87iq3radvf.fsf@telefonica.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -4.5 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.5 (----) A command path name that contains slashes (instead of backslashes) will work fine with cmdproxy as far as it doesn't require to be executed through a shell. Otherwise only backslashes work. Example: cmdproxy.exe -c "c:/foo/bar.exe" which executes bar.exe through CreateProces, works fine, but cmdproxy.exe -c "c:/foo/bar.exe | zoo.exe" which invokes the shell for executing the command, fails with an error message that comes from cmd.exe and that says "c:" is not recognized as a command. OTOH, cmdproxy.exe -c "c:\foo\bar.exe | zoo.exe" works fine. cmd.exe has no problem with commands that uses the slash as directory separator, as this works OK: cmd /c c:/foo/bar.exe so the problem must be in cmdproxy, which probably splits the command as "c:" "/foo/bar.exe" and passes it as separate arguments to the shell. Although this bug possibly is not hard to fix, maybe we should consider the larger scenario: is it worth the trouble having two separate execution paths on cmdproxy? Inconsistencies like this among the two separate ways of executing commands may arise on the future, confusing the users. Maybe we should remove the CreateProcess method and do everything through the underlying shell. ------------=_1294595643-1202-1-- From unknown Thu Aug 21 14:54:22 2025 X-Loop: help-debbugs@gnu.org Subject: bug#6784: bug#7785: rgrep is broken on woe32 Resent-From: Michael Albinus Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 10 Jan 2011 20:51:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6784 X-GNU-PR-Package: emacs,w32 X-GNU-PR-Keywords: To: Eli Zaretskii Cc: ofv@wanadoo.es, 7785@debbugs.gnu.org, Chong Yidong , sds@gnu.org, 6784@debbugs.gnu.org Received: via spool by 6784-submit@debbugs.gnu.org id=B6784.129469264212099 (code B ref 6784); Mon, 10 Jan 2011 20:51:01 +0000 Received: (at 6784) by debbugs.gnu.org; 10 Jan 2011 20:50:42 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PcOhN-000393-UW for submit@debbugs.gnu.org; Mon, 10 Jan 2011 15:50:42 -0500 Received: from mailout-de.gmx.net ([213.165.64.23] helo=mail.gmx.net) by debbugs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1PcOhK-00038m-Qn for 6784@debbugs.gnu.org; Mon, 10 Jan 2011 15:50:40 -0500 Received: (qmail invoked by alias); 10 Jan 2011 20:58:03 -0000 Received: from p57BBD461.dip0.t-ipconnect.de (EHLO detlef.gmx.de) [87.187.212.97] by mail.gmx.net (mp005) with SMTP; 10 Jan 2011 21:58:03 +0100 X-Authenticated: #3708877 X-Provags-ID: V01U2FsdGVkX18EbAkOtjAEtKdOhDO5UQ4b9w5RlwMtQ9Sk96T++V OZ+fkKuXmls+bA From: Michael Albinus References: <87d3oc17oo.fsf@telefonica.net> <87k4ijxeh2.fsf@wanadoo.es> <874o9nx9vx.fsf@wanadoo.es> <87mxnbkt50.fsf@stupidchicken.com> <83ipxyj6ub.fsf@gnu.org> Date: Mon, 10 Jan 2011 21:57:52 +0100 In-Reply-To: <83ipxyj6ub.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 09 Jan 2011 19:59:56 +0200") Message-ID: <87hbdgo4rz.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Y-GMX-Trusted: 0 X-Spam-Score: -2.6 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) Eli Zaretskii writes: > Michael, could you please take care of that (on the emacs-23 branch)? > I gather that you have your master repository, so doing it from there > would be less hassle for you, and you know the semantics of each > pipeline better than I do. Thanks. I've found 3 places to patch in tramp.el, fixed in the emacs-23 branch. Under GNU/Linux I could not observe any regression. However, I cannot test under Windows - could somebody, please, check it with a new build? It shall be sufficient to open a large (>10kB) remote file, using the plink method. Best regards, Michael.