[PATCH] Cygwin: console: Fix exit code for non-cygwin process.

Johannes Schindelin Johannes.Schindelin@gmx.de
Sat Feb 3 14:24:36 GMT 2024


Hi Takashi,

On Fri, 2 Feb 2024, Takashi Yano wrote:

> 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>

Thank you for fixing this so swiftly. I still wish the logic was
drastically simpler to understand so that even mere humans like myself
would stand a chance to fix such bugs, but I am happy that it is fixed
now.

Ciao,
Johannes


More information about the Cygwin-patches mailing list