Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[New msys2-runtime version] Cygwin: console: Redesign mode set strategy on close(). #5457

Closed
github-actions bot opened this issue Mar 3, 2025 · 1 comment

Comments

@github-actions
Copy link

github-actions bot commented Mar 3, 2025

Cygwin: console: Redesign mode set strategy on close().

The required console mode for a non-cygwin process is different from
that for a cygwin process. There are currently three modes: tty::cygwin,
tty::native, and tty::restore. The latter two are for the non-cygwin
processes. tty::restore is the mode for the non-cygwin processes that
started the cygwin process, used to restore the previous behaviour.
tty::native is the mode that reflects some terminfo flags. The issue
below is caused because the console mode fails to be restored to the
previous console mode used by cmd.exe.
This patch redesigns the strategy to determine which mode should be
set on console close() to fix all similar problems. Previously, the
number of handle count is used to determine the appropriate console
mode. However, the handle count seems uncertain for that purpose.
In the new design, the relation ship between the master process and
the process that is about to close the console is mainly used. This
can provide more certain result than previous one.

Addresses: https://github.com/microsoft/git/issues/730
Backported-from: 3312f2d21f (Cygwin: console: Redesign mode set strategy on close()., 2025-03-03)
Fixes: 30d266947842 ("Cygwin: console: Fix clean up conditions in close()")
Reported-by: Mike Marcelais, Johannes Schindelin <[email protected]>
Signed-off-by: Takashi Yano <[email protected]>
Signed-off-by: Johannes Schindelin <[email protected]>

msys2/msys2-runtime@cd64230

@dscho
Copy link
Member

dscho commented Mar 3, 2025

Fixed via git-for-windows/msys2-runtime#87.

@dscho dscho closed this as completed Mar 3, 2025
@dscho dscho added this to the Next release milestone Mar 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant