Subject: bug#69795: 29.1; cmdproxy.exe exits automatically after executing MSYS2 commands

From: Eli Zaretskii <[email-masked]>
Date: Sat, 16 Mar 2024 10:21:14 +0200

> From: [email-masked]
> Cc: [email-masked]
> 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

(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.)