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

From: [email-masked]
Date: Mon, 18 Mar 2024 10:24:59 +0900

Eli Zaretskii <[email-masked]> writes:

>> From: [email-masked]
>> Cc: [email-masked]
>> Date: Mon, 18 Mar 2024 01:12:18 +0900
>> 
>> Eli Zaretskii <[email-masked]> writes:
>> 
>> > 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?
>> 
>> Simply skipping PATH settings, cmdproxy.exe continues normally after
>> quitting c:\msys64\mingw64\bin\gdb.exe(full path needed.)
>
> So one of these two directories somehow triggers the problem?  Or do
> you need both on PATH to trigger the problem, and if you only add
> either one of them, the problem does not happen?

c:\msys64\usr\bin\ matters. And iconv.exe under it makes the difference.
In the log below, the process continues after the first call of gdb.exe,
while iconv.exe does not exist.
And the process finishes after the second call of gdb.exe,
while iconv.exe exists.

Microsoft Windows [Version 10.0.19045.4170]
(c) Microsoft Corporation. All rights reserved.

c:\tmp>set PATH=c:\msys64\usr\bin\;%PATH%
set PATH=c:\msys64\usr\bin\;%PATH%

c:\tmp>ren c:\msys64\usr\bin\iconv.exe iconv.exe-
ren c:\msys64\usr\bin\iconv.exe iconv.exe-

c:\tmp>c:\msys64\mingw64\bin\gdb.exe --version > nul
c:\msys64\mingw64\bin\gdb.exe --version > nul

c:\tmp>ren c:\msys64\usr\bin\iconv.exe- iconv.exe
ren c:\msys64\usr\bin\iconv.exe- iconv.exe

c:\tmp>c:\msys64\mingw64\bin\gdb.exe --version > nul
c:\msys64\mingw64\bin\gdb.exe --version > nul

c:\tmp>
Process shell finished