-
Notifications
You must be signed in to change notification settings - Fork 41
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
Backport some fixes to 3.4 #205
Conversation
9c7403d
to
f30ee6b
Compare
Here is the range-diff relative to the commits in cygwin-3_5-branch
|
Sorry I forgot about this. lgtm |
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: 3721a75 ("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. Backported-from: aa73e11 (Cygwin: console: Fix exit code for non-cygwin process., 2024-02-02) Fixes: 3721a75 ("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> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
If disable_master_thread flag is set between the code checking that flag not be set and the code acquiring input_mutex, input record is processed once after setting disable_master_thread flag. This patch prevents that. Backported-from: 9bcfd06 (Cygwin: console: Avoid slipping past disable_master_thread check., 2024-02-03) Fixes: d4aacd5 ("Cygwin: console: Add missing input_mutex guard.") Signed-off-by: Takashi Yano <takashi.yano@nifty.ne.jp> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
If non-cygwin process is started in pty, closing from_master_nat pipe handle was missing in fhandler_pty_slave::input_transfer(). This occured because the handle was duplicated but not closed. msys2#198 Backported-from: a6ac7b4 (Cygwin: pty: Fix handle leak in master process., 2024-02-13) Fixes: 29431fc ("Cygwin: pty: Inherit typeahead data between two input pipes.") Reported-by: Hakkin Lain Signed-off-by: Takashi Yano <takashi.yano@nifty.ne.jp> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
In pty master_thread, 6 handles are duplicated when CallNamedPipe() requests that. Though some of them are not used so should be closed, they were not. This causes handle leak potentially. Backported-from: 73cd80c (Cygwin: pty: Fix potential handle leak regarding CallNamedPipe()., 2024-02-13) Signed-off-by: Takashi Yano <takashi.yano@nifty.ne.jp> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Previously, VMIN and VTIME did not work at all. This patch fixes that. Backported-from: 73cd80c (Cygwin: pty: Fix potential handle leak regarding CallNamedPipe()., 2024-02-13) Signed-off-by: Takashi Yano <takashi.yano@nifty.ne.jp> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Non-cygwin app may call ReadFile() which makes NtQueryObject() for ObjectNameInformation block in fhandler_pipe::get_query_hdl_per_process. Therefore, stop to try to get query_hdl for non-cygwin apps. Addresses: msys2#202 Backported-from: https://inbox.sourceware.org/cygwin-patches/20240303050915.2024-1-takashi.yano@nifty.ne.jp/ Fixes: b531d6b ("Cygwin: pipe: Introduce temporary query_hdl.") Reported-by: Alisa Sireneva, Johannes Schindelin <Johannes.Schindelin@gmx.de> Reviewed-by: Signed-off-by: Takashi Yano <takashi.yano@nifty.ne.jp> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
f30ee6b
to
436c875
Compare
This corresponds to msys2/msys2-runtime#205. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Looks like we haven't updated `MSYS2-packages`' `msys2-runtime-3.4` directory in quite a while. This roll-up integrates: - msys2/msys2-runtime#205 - msys2/msys2-runtime#209 - msys2/msys2-runtime#210 - msys2/msys2-runtime#192 Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Looks like we haven't updated `MSYS2-packages`' `msys2-runtime-3.4` directory in quite a while. This roll-up integrates: - msys2/msys2-runtime#192 - msys2/msys2-runtime#205 - msys2/msys2-runtime#209 - msys2/msys2-runtime#210 - msys2/msys2-runtime#220 Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
The main reason for this is to verify the proposed fix for #202. While at it, I'll include a couple other fixes for potential hangs.