unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: awrhygty@outlook.com
Cc: 69795@debbugs.gnu.org
Subject: bug#69795: 29.1; cmdproxy.exe exits automatically after executing MSYS2 commands
Date: Sun, 17 Mar 2024 08:18:43 +0200	[thread overview]
Message-ID: <86a5mx5qkc.fsf@gnu.org> (raw)
In-Reply-To: <TYZPR01MB3920AC961290955E2C62EC01C32E2@TYZPR01MB3920.apcprd01.prod.exchangelabs.com> (awrhygty@outlook.com)

> From: awrhygty@outlook.com
> Cc: 69795@debbugs.gnu.org
> Date: Sun, 17 Mar 2024 10:06:13 +0900
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> >> 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\;
> >
> > I don't understand what you mean by "removing directories other than
> > C:\WINDOWS or descendants".  Why do they need to be removed?  And how
> > did you remove them?
> 
> I removed obviously unrelated pathnames, which are for imagemagick and
> python. They are not supplied by OS. And I removed them by hand.

I don't understand why you did that, but since it doesn't change the
results, we can ignore this aspect.

> > What happens if you change PATH to include the two addition
> > directories, c:\msys64\mingw64\bin\ and c:\msys64\usr\bin, before you
> > start Emacs, and then run GDB from the shell buffer without changing
> > PATH inside the shell buffer?
> 
> Input following command lines on cmd.exe.
>   set PATH=c:\msys64\mingw64\bin\;c:\msys64\usr\bin\;%PATH%
>   c:\Emacs\emacs-29.1\bin\emacs-29.1.exe -Q
> And run gdb in shell-mode, then process automatically finished.
> 
> Microsoft Windows [Version 10.0.19045.4170]
> (c) Microsoft Corporation. All rights reserved.
> 
> c:\tmp>set PATH
> set PATH
> PATH=c:\msys64\mingw64\bin\;c:\msys64\usr\bin\;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;
> 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 <http://gnu.org/licenses/gpl.html>
> 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:
> <https://www.gnu.org/software/gdb/bugs/>.
> Find the GDB manual and other documentation resources online at:
>     <http://www.gnu.org/software/gdb/documentation/>.
> 
> For help, type "help".
> Type "apropos word" to search for commands related to "word".
> (gdb) q
> 
> c:\tmp>
> Process shell finished

Same result.

> > Please also show the contents of these two directories you add to
> > PATH.  Maybe the reason for this is something in those directories.
> 
> Here is output of dir command.

Nothing jumps out as an obvious problem, but you did say that setting
PATH affects this?  How does it affect the problem?  Is there a recipe
where you invoke GDB with a different PATH, and don't see "Process
shell finished" after exiting GDB?  If so, can you show a recipe with
that different PATH?

Btw, why do you add these directories to PATH in the first place?  The
second one is a directory with MSYS executables, so why do you need it
for running GDB?  The first one is for MinGW64 executables, but since
you invoke GDB via n explicit absolute file name, you don't need to
add the directory to PATH.





  reply	other threads:[~2024-03-17  6:18 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-14 10:55 bug#69795: 29.1; cmdproxy.exe exits automatically after executing MSYS2 commands awrhygty
2024-03-14 11:25 ` Eli Zaretskii
2024-03-14 15:56   ` awrhygty
2024-03-14 16:48     ` Eli Zaretskii
2024-03-15 12:10       ` awrhygty
2024-03-15 12:49         ` Eli Zaretskii
2024-03-16  3:52           ` awrhygty
2024-03-16  8:21             ` Eli Zaretskii
2024-03-16 13:14               ` awrhygty
2024-03-16 17:34                 ` Eli Zaretskii
2024-03-17  1:06                   ` awrhygty
2024-03-17  6:18                     ` Eli Zaretskii [this message]
2024-03-17 16:12                       ` awrhygty
2024-03-17 16:24                         ` Eli Zaretskii
2024-03-18  1:24                           ` awrhygty
2024-03-18 13:05                             ` Eli Zaretskii
2024-03-18 22:54                               ` awrhygty
2024-03-19 12:32                                 ` Eli Zaretskii
2024-03-19 13:21                                   ` awrhygty
2024-03-19 13:49                                     ` Eli Zaretskii
2024-03-19 14:26                                       ` awrhygty
2024-03-19 15:50                                         ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86a5mx5qkc.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=69795@debbugs.gnu.org \
    --cc=awrhygty@outlook.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).