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 12:52:19 +0900 Message-ID: References: <86h6h99hse.fsf@gnu.org> <86bk7gahe2.fsf@gnu.org> <86a5mz8xte.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="18841"; 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 04:53:44 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 1rlL7A-0004jW-Bh for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 16 Mar 2024 04:53:44 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rlL6u-0005Cp-LI; Fri, 15 Mar 2024 23:53:28 -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 1rlL6r-0005CK-Ju for bug-gnu-emacs@gnu.org; Fri, 15 Mar 2024 23:53: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 1rlL6r-0000uT-7H for bug-gnu-emacs@gnu.org; Fri, 15 Mar 2024 23:53:25 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rlL7R-000361-Rb for bug-gnu-emacs@gnu.org; Fri, 15 Mar 2024 23:54:01 -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 03:54:01 +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.171056119111829 (code B ref 69795); Sat, 16 Mar 2024 03:54:01 +0000 Original-Received: (at 69795) by debbugs.gnu.org; 16 Mar 2024 03:53:11 +0000 Original-Received: from localhost ([127.0.0.1]:54694 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rlL6c-00034i-Jv for submit@debbugs.gnu.org; Fri, 15 Mar 2024 23:53:11 -0400 Original-Received: from mail-southeastasiaazolkn19010000.outbound.protection.outlook.com ([52.103.65.0]:44597 helo=SG2PR03CU006.outbound.protection.outlook.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rlL6Y-00034A-OF for 69795@debbugs.gnu.org; Fri, 15 Mar 2024 23:53:08 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Xb7tb1QSUvSPhPJ1orVTYDzozSloN6Y/ykKDXeKh/7LqvIVzR/c/eatyOPY+jlKT1tN7MIbnGTMXzxULeQVVH02/BtutnXSTJMq+6uggBVb8gxb1P72yj9eR/6knsxGOdsCkmn4RY77H1TsWtG18uR2AAhxfAAvJZGE2fvpPGYuxRcS3z2lKWqwGqEHq9FkKyABJ7ub8uGtTJd2YQAGYQXUHqcP2ptL/k0VnDmXaJq08RMLOwF7T1kOcMpyUbhe/yQlxVsJM8Br92JJTUWKFh6PrNTLWLnuRCKFYl97nkrGi0t9xagIwKGbiv2jxOEOJaPd89uZoadG95xwe9oF99A== 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=B1q02syq9XsK/sIyG6IZ1rOyuiegDh+WRLlyfb+pZjQ=; b=PqKNU0dV5xQlamMVXZhZyEZP1fuzvfN/9S4MVnmWEC3pryniGkkouOM35rtF8LjqYEcNRmDfs1slDkVVX4QO4WH4w6suOlmYNN7jJiG/1mWgYlEHZeBiuM/Vi1aJ1RciU12qQS8WiDHdqBfcozttBkITLb4MHwTmY3pQa2hJ3k0wTPUGnIQVpIuXMCbyrJJEHKzB1bzylax6IVWD00CCY6GPRveg2z1n7XSjsJWXLKuvRhhRnlMOMOVJui9FWgj+DVxghUc2wFEZnbRkG6xSgD49L8jdKMmlj9KoB7QZ1tx6OTbNydLSAynQXvcITZjJWmrWfuld0sYMZtWPTl6PKA== 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=B1q02syq9XsK/sIyG6IZ1rOyuiegDh+WRLlyfb+pZjQ=; b=H3ikBWLUT64KEmE4tUbde9xcXXnPSmXX24DyLczwxES1OvKb1yU3+Cpv5WeCV1WRj9M1Jp0bGRsoF1/GgySVqySSeN60r0td/P4aw4L00lT+Oo5Ng1RZeYvQCGAxbHcgbl+rbGZK9mjFzxa18e1LFWbiqVdh8FbSzebcOq6foVjUq0kU/ezOtV/VpcGA0VAkzytFEetSfrrgFmH2GxO8BrO9KWx/euEbfbCFvv4H/WtcUNbsQMUf3dWN27Ar+sZktjG3c+teThiwZc8RybXpP5/w0Ya9Xg9hxzN1DO0vboi1qGB3TSIUlRJPO/1PB/g/Qg/VR+X+p2AhdqrZq1L7aw== Original-Received: from TYZPR01MB3920.apcprd01.prod.exchangelabs.com (2603:1096:400:30::11) by SEYPR01MB4462.apcprd01.prod.exchangelabs.com (2603:1096:101:8b::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7386.21; Sat, 16 Mar 2024 03:52:21 +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.020; Sat, 16 Mar 2024 03:52:21 +0000 In-Reply-To: <86a5mz8xte.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 15 Mar 2024 08:49:30 -0400") X-TMN: [+yAfev28pV+LQ/ERdLQrdyMoM9JlYygN] X-ClientProxiedBy: OS3P286CA0088.JPNP286.PROD.OUTLOOK.COM (2603:1096:604:1f6::19) To TYZPR01MB3920.apcprd01.prod.exchangelabs.com (2603:1096:400:30::11) X-Microsoft-Original-Message-ID: <86edcan898.fsf@outlook.com> X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYZPR01MB3920:EE_|SEYPR01MB4462:EE_ X-MS-Office365-Filtering-Correlation-Id: a7ad60ff-63c4-4daf-f657-08dc456c7b26 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: xX1MK1iSQWtViYMMNC5fLUzxsWLpepiZDlZGFQhiVw+fFD/BKzfUmwflN1tUMi80azDWEg8XefqNOutzQb7KiEcJmLnGQDqQWggsUvWAGJdHBcmHOHqGvjeRrzI428j7it/gFTWMKdmi7LL0TNDRG8T9HWLIWNFqytRBqTS7bFM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exuZEOETtf0FJpFiJGquxrym1JJMcbVBnLmcf7kO/u1qfsbzbbG2T7NZwq8I05Lfi6r8UyEzv4vezvfH1V3ZCh/9V9ffZy7WhAoXTiK2vOLOp6CocF2uzdQ3QrjtKIt2cifhj68G6et3QSAoWxQX5deOli/YCuOBR4CVeeZNh2Vr/DqoYAv4fFP2aUg65yMFBxamMluikA6mdvPSn2yj5fYPMVHsZF1Ug2ywIOYLEVgzaUeY20Vo I0OSJaC+0cgLpgahN0p0PctlbVkDCKywqYIOafgTk6bjQIMO/fnKaeQcnZlUwHVHL/Z9RsvG+J2YUMXWhwuqyNbKXKx0aGJ7Az X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: a7ad60ff-63c4-4daf-f657-08dc456c7b26 X-MS-Exchange-CrossTenant-AuthSource: TYZPR01MB3920.apcprd01.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Mar 2024 03:52:21.2768 (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: SEYPR01MB4462 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:281703 Archived-At: Eli Zaretskii writes: >> From: awrhygty@outlook.com >> Cc: 69795@debbugs.gnu.org >> Date: Fri, 15 Mar 2024 21:10:06 +0900 >> >> > Doesn't MSYS2 provide a MinGW64 build of GDB, not just an MSYS build? >> > GDB builds natively with MinGW tools, so there should be no problem >> > for MSYS2 folks to provide a native 64-bit Windows build of GDB. >> >> I have installed mingw64/mingw-w64-x86_64-gdb. >> I think it is MinGW64 binary. > > Yes. But then all the discussion around MSYS2 programs is not > relevant to this issue. > >> But gdb.exe sometimes make cmdproxy.exe exit, and sometimes not. > > 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. Here is a log. Microsoft Windows [Version 10.0.19045.4170] (c) Microsoft Corporation. All rights reserved. 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>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 > Also, did you look at this discussion to which I pointed: > > https://lists.gnu.org/archive/html/emacs-devel/2023-01/msg00242.html > > It's possible that the process-send-eof mentioned there is somehow > involved in what you see. Redefining #'comint-simple-send to remove #'process-send-eof, cmdproxy.exe behaves same, exits automatically. (defun comint-simple-send (proc string) "Default function for sending to PROC input STRING. This just sends STRING plus a newline. To override this, set the hook `comint-input-sender'." (let ((send-string (if comint-input-sender-no-newline string ;; Sending as two separate strings does not work ;; on Windows, so concat the \n before sending. (concat string "\n")))) (comint-send-string proc send-string))) >> Here is a list of gdb packages. > > That's a large list. Are you using GDB for debugging native Windows > programs, or are you using it for debugging other executables (like > ARM or AVR) via gdbserver? Which of these packages do you actually > have installed and are using? They are available package names. I have installed only one of them, which is marked as [installed]. I am not sure which is best.