From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#69795: 29.1; cmdproxy.exe exits automatically after executing MSYS2 commands Date: Thu, 14 Mar 2024 18:48:53 +0200 Message-ID: <86bk7gahe2.fsf@gnu.org> References: <86h6h99hse.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29049"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 69795@debbugs.gnu.org To: awrhygty@outlook.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Mar 14 17:49:57 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 1rkoHD-0007FZ-5U for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 14 Mar 2024 17:49:55 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rkoGl-0003go-KO; Thu, 14 Mar 2024 12:49:27 -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 1rkoGk-0003gg-Nr for bug-gnu-emacs@gnu.org; Thu, 14 Mar 2024 12:49: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 1rkoGk-0001z1-Fv for bug-gnu-emacs@gnu.org; Thu, 14 Mar 2024 12:49:26 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rkoHJ-0000Q2-UW for bug-gnu-emacs@gnu.org; Thu, 14 Mar 2024 12:50:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 14 Mar 2024 16:50: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.17104349871582 (code B ref 69795); Thu, 14 Mar 2024 16:50:01 +0000 Original-Received: (at 69795) by debbugs.gnu.org; 14 Mar 2024 16:49:47 +0000 Original-Received: from localhost ([127.0.0.1]:50490 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rkoH5-0000PS-2x for submit@debbugs.gnu.org; Thu, 14 Mar 2024 12:49:47 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:53518) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rkoH0-0000PD-SZ for 69795@debbugs.gnu.org; Thu, 14 Mar 2024 12:49:45 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rkoGL-0001t1-Bt; Thu, 14 Mar 2024 12:49:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=rNoZkfFRxMEBJ2O6vQ7eacH/dBtlXMgabu8rOAqGbwY=; b=MOmHLXi+Hr0e 4Hk5vOylXX+/x/OsDMOGZsGzJ3M+7PLu5POybkGHssfMQKh8YDmboL4foQzkfcVvNM0oNfC2CYPgQ r/AdK+FM5TmC94T435UozXDKljRV0Z8Ov1RkiCJhAK25Zzj7f5ktyRR4Nwy30vxKAq3eZu+Xfv7XD ybtCz3Z+T4Qq3f1Ysi/xFU6Q7vUP1I5WnXUYWeiupWUJgzXS9s5a3Q91rA3q7+IoUTLQMXJkEX5WW GDDSns0kfjOswna8+Vk2cwYemuWHRl8jgF3elmkdkIa/JgrkCb/OxvFiE5gTcLQ5uvLI+k6CNj3gB g4ERaGq/NXFzH/08xNez9Q==; In-Reply-To: (awrhygty@outlook.com) 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:281623 Archived-At: > From: awrhygty@outlook.com > Cc: 69795@debbugs.gnu.org > Date: Fri, 15 Mar 2024 00:56:02 +0900 > > Replacing 'ls -ld .' with 'ls -d .', which outputs only '.', > cmdproxy.exe exits, too. > Replacing 'ls -d .' with 'ls -d . < nul' does not make cmdproxy.exe exit. If cmdproxy exits, it probably means cmd.exe that cmdproxy runs exited. The shell-mode buffer interacts with cmd.exe, not with cmdproxy. cmdproxy in this scenario is used only to start an inferior cmd.exe. You may wish looking in the Windows Event Log, under Application. It is possible that there's some useful information there about why you see that shell process finishes, like which program crashed and why. Or maybe this could be the return of this old problem: https://lists.gnu.org/archive/html/emacs-devel/2023-01/msg00242.html > > If you want to run MSYS or Cygwin programs from Emacs, my suggestion > > is to use the Cygwin build of Emacs. There are two configurations for > > that: either use the Cygwin X server, or use the w32 "toolkit"; the > > latter possibility has the look-and-feel very similar to the native > > Windows build, so maybe you will prefer it. > > > > Other than that, running MSYS programs from a native build of Emacs > > should be considered "not really supported". > > Is calling MSYS2 commands from #'start-process or #'call-process > not recommended? In general, not recommended, due to the compatibility issues I described. (But cmdproxy is not involved when start-process or call-process are used, unless the application is a DOS program.) > I only needed gdb, another binary will do. But I do not know where to > get a reliable gdb binary run with emacs shell-mode. 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.