From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: awrhygty@outlook.com Newsgroups: gmane.emacs.bugs Subject: bug#69795: 29.1; cmdproxy.exe exits automatically after executing MSYS2 commands Date: Sat, 16 Mar 2024 22:14:49 +0900 Message-ID: References: <86h6h99hse.fsf@gnu.org> <86bk7gahe2.fsf@gnu.org> <86a5mz8xte.fsf@gnu.org> <86il1m7fk5.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7453"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 69795@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Mar 16 14:15:43 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rlTt1-0001l1-1C for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 16 Mar 2024 14:15:43 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rlTso-00008o-Db; Sat, 16 Mar 2024 09:15:30 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rlTsk-00008G-8M for bug-gnu-emacs@gnu.org; Sat, 16 Mar 2024 09:15:26 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rlTsj-0006VH-SN for bug-gnu-emacs@gnu.org; Sat, 16 Mar 2024 09:15:25 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rlTtK-00082g-AM for bug-gnu-emacs@gnu.org; Sat, 16 Mar 2024 09:16:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: awrhygty@outlook.com Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 16 Mar 2024 13:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69795 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: notabug Original-Received: via spool by 69795-submit@debbugs.gnu.org id=B69795.171059494230857 (code B ref 69795); Sat, 16 Mar 2024 13:16:02 +0000 Original-Received: (at 69795) by debbugs.gnu.org; 16 Mar 2024 13:15:42 +0000 Original-Received: from localhost ([127.0.0.1]:55125 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rlTt0-00081c-6c for submit@debbugs.gnu.org; Sat, 16 Mar 2024 09:15:42 -0400 Original-Received: from mail-sgaapc01olkn2018.outbound.protection.outlook.com ([40.92.53.18]:26272 helo=APC01-SG2-obe.outbound.protection.outlook.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rlTsx-00081H-4i for 69795@debbugs.gnu.org; Sat, 16 Mar 2024 09:15:40 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ARPxVp//3CJCewj0vN18v2S0/oLr3+E5UuiX1/d6uHVW7bB/c20mwaNTJxZUnzOC8pvUn14R3W50xKgomdLmgnoR8f3+t1rf9ktQci4mqtk0uv8r2ANa/af2cPQCCoGN3XG6XsrCnqb5FBll0t7GF8YRenvSQeoTHsHjW90f9x34lkDtooXtp7OROm6rottIdsC9lvRQ0YPXpbjBuwevSC5Mi3cQQ73rnOoRK2veEZNsNEZovNN4pf7c5LJMi43OhIvihr7NJWOPVkJIX4cl+PzFdr7I+WdFs+85o5TGZ4bd6Ww8GmPnYwZNb4vvLH30el93v3/5EJIbgMm+iortpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=VU+J2kB5j4cKprjvcKfiQ0mPDbFX0s4cb144VxA/jaw=; b=O2olYg7dTkWh/+xfuHZF4sULHR7quGcqN1DVOua8mZBpfT639HUUirZOpQMRo6jxShsSVxI/6TI0hm7TEB8jTcprYKQmHhMG4wh5hZJv6Y1XoFqunz7+r7YFBmsbyuBA+o42XJZBCodANE1qCivDQHDqpzJGfq2oh9CprAWeBdChlmR46Y89nyhdE3z9Gd6W5EEw+aVwy67mZ4ZGKiqPfEwdg61QpRpy3oKbZ+mXFdVXJO7u6GDltGB9+Jwwo2Rbu7XyZEdZLOFJONDQpPyaJEKL9irq9Hp2o0VDmlnqKKo5dCW3JUuJkyKCh+0PoBq88o3xAAOaefMAFa76v+1F3Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=VU+J2kB5j4cKprjvcKfiQ0mPDbFX0s4cb144VxA/jaw=; b=TypqwYyWCZOIGmFyIEb3N2Ff0W8jF72tBzeiy2hy/MQwDhz8Z3qfBt7mBF3gkM1un8iMw2aevYsmrg/6K19AgfW8K/8yqxpwTWO72P9GWyBk9rPP1Re9xS/I5Xij+G1IwbL3vhU0LgTK6bYttlMtUAY/kRuT0oj99nDlm9rdGrrDCK9JaRGdiYc/jnC4T08VllLvBFFdKWq5DFrUtFgC1uLkF+xfzUPa5g6o0aFuGBuBOLmkJVgKi+EIgLqOzJlhFnYcBqM6T5wlXr/PSkheHFepqhEb4QgjEQXhsH3CB1NxqhnYGGokhBkHpVh5DLeBEwZEbcx/NGIBmxxthLBKxg== Original-Received: from TYZPR01MB3920.apcprd01.prod.exchangelabs.com (2603:1096:400:30::11) by SEZPR01MB6178.apcprd01.prod.exchangelabs.com (2603:1096:101:224::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7362.27; Sat, 16 Mar 2024 13:14:54 +0000 Original-Received: from TYZPR01MB3920.apcprd01.prod.exchangelabs.com ([fe80::690a:1426:4f0f:57b1]) by TYZPR01MB3920.apcprd01.prod.exchangelabs.com ([fe80::690a:1426:4f0f:57b1%3]) with mapi id 15.20.7386.022; Sat, 16 Mar 2024 13:14:54 +0000 In-Reply-To: <86il1m7fk5.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 16 Mar 2024 04:21:16 -0400") X-TMN: [f9sIlsaZ+RAMcXUEwHpZ2W/fLHjSXExu] X-ClientProxiedBy: OS0P286CA0103.JPNP286.PROD.OUTLOOK.COM (2603:1096:604:b1::18) To TYZPR01MB3920.apcprd01.prod.exchangelabs.com (2603:1096:400:30::11) X-Microsoft-Original-Message-ID: <86a5mymi7q.fsf@outlook.com> X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYZPR01MB3920:EE_|SEZPR01MB6178:EE_ X-MS-Office365-Filtering-Correlation-Id: 0dfd67a0-8c75-4f95-74d9-08dc45bb1014 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: oPGTuJ+/n1nPOdkGZ+AlXuNga0fGNorYY9REIAbX+IG221pdQeqv591sCEx/qh1/jnhczkNL/zGNOhNBXnknl8uwMPvFlFaGrXG4kt2OwLB4VHIjlB5z0AlBJ9XxBHejx6ORyQzcOGGJSNi2NzANHdK5IF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8anH3CSl7lh5bMtfhn6sR7mu+A1f407tGkspg9N/nC0Vc3SYGer/t8nJ7s0mI0Lt+2D2GnVBR9+TT+tbJYgRQ2FTcWyiJ9ekv+IfLHbTknwC+5LpwE9FwnqPkyVOJtZMiCLtTKsBQK8gr87MaugADZG98d94kacXVuu8YOr7n75LmW5RAtNyAWGX60m9ah+/a/Ohnkk+HPqbJJLMBDIQeNPHwFk7vEwT0VGphsjbThGhgj9ptLlTCQKwjXiNm0tB67hVrO/H12XUo LD2czzbCfP/Rc2weRQHl6GPsw7SI/mFWrBBsv9crEILbpmMA2ARJft1BrwdaPMNouOlu1IylArdiBEuxyfBow5nP7p2W8t7r2k X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0dfd67a0-8c75-4f95-74d9-08dc45bb1014 X-MS-Exchange-CrossTenant-AuthSource: TYZPR01MB3920.apcprd01.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Mar 2024 13:14:53.4785 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: SEZPR01MB6178 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:281725 Archived-At: Eli Zaretskii writes: >> From: awrhygty@outlook.com >> Cc: 69795@debbugs.gnu.org >> Date: Sat, 16 Mar 2024 12:52:19 +0900 >> >> > So let's start from the beginning: can you show a recipe, starting >> > from "emacs -Q", where you invoke GDB from Emacs, and cmdproxy (or >> > some other sub-process) exits? >> >> I found that setting PATH make the difference. >> Start emacs -Q, type 'M-x shell RET', >> and input following command lines. >> set PATH=c:\msys64\mingw64\bin\;c:\msys64\usr\bin\;%PATH% >> c:\msys64\mingw64\bin\gdb.exe >> q >> Then cmdproxy.exe exits automatically. > > Please show the value of PATH after "set PATH" above. Like this: > > c:\tmp>set PATH Before setting PATH, the value is: C:\ImageMagick;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Users\user\AppData\Local\Programs\Python\Python310\Scripts\;C:\Users\user\AppData\Local\Programs\Python\Python310\;C:\Users\user\AppData\Local\Microsoft\WindowsApps; Then removing directories other than C:\WINDOWS or descendants: C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\; Here is a log with the PATH value above. Microsoft Windows [Version 10.0.19045.4170] (c) Microsoft Corporation. All rights reserved. c:\tmp>set PATH=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\; set PATH=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\; c:\tmp>set PATH=c:\msys64\mingw64\bin\;c:\msys64\usr\bin\;%PATH% set PATH=c:\msys64\mingw64\bin\;c:\msys64\usr\bin\;%PATH% c:\tmp>set PATH set PATH PATH=c:\msys64\mingw64\bin\;c:\msys64\usr\bin\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\; PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC c:\tmp>c:\msys64\mingw64\bin\gdb.exe c:\msys64\mingw64\bin\gdb.exe GNU gdb (GDB) 13.2 Copyright (C) 2023 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-w64-mingw32". Type "show configuration" for configuration details. For bug reporting instructions, please see: . Find the GDB manual and other documentation resources online at: . For help, type "help". Type "apropos word" to search for commands related to "word". (gdb) q c:\tmp> Process shell finished > (I have a very different MinGW directory tree here, but I tried to do > something equivalent to what you do above, and couldn't reproduce it: > I get placed at the cmd.exe prompt, as expected.) > > And once again: it is not cmdproxy that exits, it's cmd.exe. cmdproxy > will not exit until the process it started, in this case cmd.exe, > exits. > > Btw, why do you end each element of PATH with a backslash '\' ? This > is not required. (I don't think it's part of your problem, but > still.) I often use 'C-x C-f' to input a pathname, and 'C-w'(copy) 'C-g'(quit) in minibuffer. '/' at the last of directory names are automatically added by completion. Then I replaced '/' with '\'. I have forgotten that the last '\' is not required (and not inhibited).