diff options
author | Takashi Yano <takashi.yano@nifty.ne.jp> | 2025-03-03 15:31:23 +0900 |
---|---|---|
committer | Takashi Yano <takashi.yano@nifty.ne.jp> | 2025-03-03 17:58:14 +0900 |
commit | 3312f2d21f136c371ba55e019b027727e64c1c62 (patch) | |
tree | 386aac6b7575303bf716a98b40e761a7afecd250 /newlib/libc/stdlib/arc4random.c | |
parent | 82b541a4759a11935c2dc2c18f05dfd7e227699d (diff) | |
download | newlib-3312f2d21f136c371ba55e019b027727e64c1c62.zip newlib-3312f2d21f136c371ba55e019b027727e64c1c62.tar.gz newlib-3312f2d21f136c371ba55e019b027727e64c1c62.tar.bz2 |
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
Fixes: 30d266947842 ("Cygwin: console: Fix clean up conditions in close()")
Reported-by: Mike Marcelais, Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Takashi Yano <takashi.yano@nifty.ne.jp>
Diffstat (limited to 'newlib/libc/stdlib/arc4random.c')
0 files changed, 0 insertions, 0 deletions