]> sourceware.org Git - newlib-cygwin.git/commit
Cygwin: console: Fix exit code for non-cygwin process.
authorTakashi Yano <takashi.yano@nifty.ne.jp>
Fri, 2 Feb 2024 04:59:19 +0000 (13:59 +0900)
committerTakashi Yano <takashi.yano@nifty.ne.jp>
Fri, 2 Feb 2024 05:28:39 +0000 (14:28 +0900)
commit084f848ab9a51d0125491a6f2a7a741f9df73218
treefcb96a9a298fc82a4bfd4c7bb43299e5cd1e64a4
parentc414e1b97252789d2ab46c1b8fbe502a9ffca8b8
Cygwin: console: Fix exit code for non-cygwin process.

If non-cygwin process is executed in console, the exit code is not
set correctly. This is because the stub process for non-cygwin app
crashes in fhandler_console::set_disable_master_thread() due to NULL
pointer dereference. This bug was introduced by the commit:
3721a756b0d8 ("Cygwin: console: Make the console accessible from
other terminals."), that the pointer cons is accessed before fixing
when it is NULL. This patch fixes the issue.

Fixes: 3721a756b0d8 ("Cygwin: console: Make the console accessible from other terminals.")
Reported-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Takashi Yano <takashi.yano@nifty.ne.jp>
winsup/cygwin/fhandler/console.cc
This page took 0.029257 seconds and 5 git commands to generate.