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

2024-02-03 Thread Johannes Schindelin
le: Make the console accessible from other > terminals.") > Reported-by: Johannes Schindelin > Signed-off-by: Takashi Yano 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 f

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

2024-02-03 Thread Johannes Schindelin
Hi Takashi, On Sat, 3 Feb 2024, Johannes Schindelin wrote: > 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 > > cra

Re: [PATCH] Cygwin: console: Avoid slipping past disable_master_thread check.

2024-02-03 Thread Johannes Schindelin
Hi Takashi, On Sat, 3 Feb 2024, Takashi Yano wrote: > 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. > > Fixes: d4aacd5

Re: [PATCH] Cygwin: pipe: Give up to use query_hdl for non-cygwin apps.

2024-03-03 Thread Johannes Schindelin
on block in fhandler_pipe::get_query_hdl_per_process. > Therefore, stop to try to get query_hdl for non-cygwin apps. > > Addresses: https://github.com/msys2/msys2-runtime/issues/202 > > Fixes: b531d6b06eeb ("Cygwin: pipe: Introduce temporary query_hdl.") > Reported-

Re: [PATCH] Cygwin: pipe: Restore blocking mode of read pipe on close()

2024-09-02 Thread Johannes Schindelin
Hi Corinna and Takashi, On Mon, 2 Sep 2024, Corinna Vinschen wrote: > On Aug 30 23:15, Takashi Yano wrote: > > If a cygwin app is executed from a non-cygwin app and the cygwin > > app exits, read pipe remains on non-blocking mode because of the > > commit fc691d0246b9. Due to this behaviour, the

Re: [PATCH] cygthread: suspend thread before terminating.

2024-11-13 Thread Johannes Schindelin
Hi Jeremy, On Tue, 12 Nov 2024, Jeremy Drake via Cygwin-patches wrote: > From: Jeremy Drake > > This addresses an extremely difficult to debug deadlock when running > under emulation on ARM64. > > A relatively easy way to trigger this bug is to call `fork()`, then within the > child process imme

Re: [PATCH 0/4] find_fast_cwd_pointer rewrite

2025-03-26 Thread Johannes Schindelin
Hi Jeremy, first of all: thank you for doing this! I had planned on investing some time to figure out a "cheap" way to determine opcode lengths and skip uninteresting ones, and it would invariably have been a lot hackier than the solution you came up with, and I would probably have taken six month

[PATCH] Cygwin: Adjust CWD magic to accommodate for the latest Windows previews

2025-03-01 Thread Johannes Schindelin
rsp`, etc, and focuses on finding the `lea`, `call ntdll!RtlEnterCriticalSection` and `mov ..., rbx` instructions, much like it was prototyped out for ARM64 at https://gist.github.com/jeremyd2019/aa167df0a0ae422fa6ebaea5b60c80c9 Signed-off-by: Johannes Schindelin --- Published-As: https://githu

Re: [PATCH] Cygwin: fork: Call pthread::atforkchild () after other initializations

2025-04-04 Thread Johannes Schindelin
Hi Takashi, On Fri, 4 Apr 2025, Takashi Yano wrote: > On Fri, 04 Apr 2025 07:27:09 +0200 Johannes Schindelin wrote: > > > Is Jeremy's guess "if raw_write doesn't need to wait (ie, there's room > > in the pipe for the write) it doesn't hit the signal stu

Re: [PATCH] Cygwin: fork: Call pthread::atforkchild () after other initializations

2025-04-03 Thread Johannes Schindelin
-0700 (PDT) Jeremy Drake wrote: > On Thu, 3 Apr 2025, Johannes Schindelin wrote: > > > I still have a question that I would like to be answered in the commit > > message, too: > > > > If `signal_arrived` is only initialized in `fixup_after_fork()` but user > > callbacks

Re: [PATCH] Cygwin: fork: Call pthread::atforkchild () after other initializations

2025-04-04 Thread Johannes Schindelin
Hi Takashi, On Fri, 4 Apr 2025, Takashi Yano wrote: > On Fri, 4 Apr 2025 14:13:57 +0200 (CEST) > Johannes Schindelin wrote: > > On Fri, 4 Apr 2025, Takashi Yano wrote: > > > On Fri, 04 Apr 2025 07:27:09 +0200 Johannes Schindelin wrote: > > > > > > > Is

[PATCH] Cygwin: pipe: Fix hang due to inadvertent 0-length raw_write()

2025-03-27 Thread Johannes Schindelin
rrect write length in raw_write()) Helped-by: Corinna Vinschen Signed-off-by: Johannes Schindelin --- Published-As: https://github.com/dscho/msys2-runtime/releases/tag/fix-ninja-hang-v1 Fetch-It-Via: git fetch https://github.com/dscho/msys2-runtime fix-ninja-hang-v1 As per Corinna's requ

Re: [PATCH] Cygwin: fork: Call pthread::atforkchild () after other initializations

2025-04-03 Thread Johannes Schindelin
Hi Takashi, On Thu, 3 Apr 2025, Takashi Yano wrote: > Previously, the callback registered by pthread_atfork() is called > before _my_tls.fixup_after_fork(). This causes misbehaviour if the > callback uses tls related functions. Due to this problem, subprocess > of cmake (> 3.29.x) sometimes fails

Re: [PATCH] Cygwin: console: Store console mode only when console is opened

2025-05-08 Thread Johannes Schindelin
t; Fixes: 0bfd91d57863 ("Cygwin: console: tty::restore really restores the > previous mode") > Reported-by: Johannes Schindelin > Signed-off-by: Takashi Yano Thank you! I can confirm that this re-fixes the problem fixed in 3312f2d21f (Cygwin: console: Redesign mode set strate

[PATCH] Cygwin: do retrieve AzureAD users' information again

2025-06-03 Thread Johannes Schindelin
_windows: skip LookupAccountSid for SIDs known to fail, 2025-04-10) intact. Reported-by: Robert Fensterman Fixes: e04891d67a (Cygwin: fetch_account_from_windows: skip LookupAccountSid for SIDs known to fail, 2025-04-10) Signed-off-by: Johannes Schindelin --- Published-As: https://github.com/dscho

[PATCH] symlink_native: allow linking to `..`

2025-06-20 Thread Johannes Schindelin
prefix of the parent directory of the link itself. Let's fix that. Signed-off-by: Johannes Schindelin --- Published-As: https://github.com/dscho/msys2-runtime/releases/tag/fix-dotdot-native_symlink-v1 Fetch-It-Via: git fetch https://github.com/dscho/msys2-runtime fix-dotdot-native_symlink

[PATCH v2] pipe: fix SSH hang (again)

2025-06-24 Thread Johannes Schindelin
tch). Fixes: cbfaeba4f7 (Cygwin: pipe: Fix incorrect write length in raw_write(), 2024-11-06) Co-authored-by: Takashi Yano Signed-off-by: Johannes Schindelin --- Published-As: https://github.com/dscho/msys2-runtime/releases/tag/fix-ssh-hangs-reloaded-v2 Fetch-It-Via: git fetch https://github.com/d

Re: [PATCH v2] pipe: fix SSH hang (again)

2025-06-24 Thread Johannes Schindelin
Hi Takashi, On Wed, 25 Jun 2025, Johannes Schindelin wrote: > On Wed, 25 Jun 2025, Takashi Yano wrote: > > > I found the patch blocks non-blocking write in some condition. > > Could you please describe these conditions? I had _guessed_ from looking at the diff that on

Re: [PATCH v2] pipe: fix SSH hang (again)

2025-06-25 Thread Johannes Schindelin
Hi Takashi, On Wed, 25 Jun 2025, Johannes Schindelin wrote: > On Wed, 25 Jun 2025, Takashi Yano wrote: > > > I'd revise the patch as follows. Could you please test if the > > following patch also solves the issue? > > Will do. For the record, in my tests, this fi

[PATCH] pipe: fix SSH hang (again)

2025-06-23 Thread Johannes Schindelin
wever, the following `while` loop expects `len - chunk` (which is assigned to `len1`) not to be positive in non-blocking mode. Let's reinstate that clamping logic and implicitly fix this SSH hang. Fixes: cbfaeba4f7 (Cygwin: pipe: Fix incorrect write length in raw_write(), 2024-11-06) Signed-o

Re: [PATCH v2] pipe: fix SSH hang (again)

2025-06-24 Thread Johannes Schindelin
Hi Takashi, On Wed, 25 Jun 2025, Takashi Yano wrote: > I found the patch blocks non-blocking write in some condition. Could you please describe these conditions? > I'd revise the patch as follows. Could you please test if the > following patch also solves the issue? Will do. Thank you, Johann

Re: [PATCH v2] Cygwin: pipe: Simplify raw_write() a bit (stop to use chunk)

2025-06-25 Thread Johannes Schindelin
Hi Takashi, On Wed, 25 Jun 2025, Takashi Yano wrote: > Reviewed-by: > Signed-off-by: Takashi Yano This is way too terse. There is a difference between being succinct and leaving things unsaid. Also, please make sure that v2 is a reply to v1 of the patch. I almost commented on v1 by mistake. >

Re: [PATCH] Cygwin: pipe: Fix unexpected blocking mode change by pipe_data_available()

2025-06-25 Thread Johannes Schindelin
Hi Takashi, On Wed, 25 Jun 2025, Takashi Yano wrote: > pipe_data_available() is called in the raw_write() and if the pipe > is real_non_blocking_mode in raw_write(), the pipe mode can be > accidentally reverted to blocking mode in some cases by calling > pipe_data_available(). Okay, let's unpack

Re: [PATCH v2] pipe: fix SSH hang (again)

2025-06-25 Thread Johannes Schindelin
Hi Takashi, On Wed, 25 Jun 2025, Takashi Yano wrote: > On Wed, 25 Jun 2025 19:55:34 +0900 > Takashi Yano wrote: > > > > On Wed, 25 Jun 2025 09:38:17 +0200 (CEST) > > Johannes Schindelin wrote: > > > > > > On Wed, 25 Jun 2025, Johannes Schindelin

Re: [PATCH v2] pipe: fix SSH hang (again)

2025-06-25 Thread Johannes Schindelin
Hi Takashi, On Wed, 25 Jun 2025, Takashi Yano wrote: > On Wed, 25 Jun 2025 09:38:17 +0200 (CEST) > Johannes Schindelin wrote: > > > On Wed, 25 Jun 2025, Johannes Schindelin wrote: > > > > > On Wed, 25 Jun 2025, Takashi Yano wrote: > > > > > &

Re: [PATCH v2] pipe: fix SSH hang (again)

2025-06-25 Thread Johannes Schindelin
Hi Takashi, On Wed, 25 Jun 2025, Takashi Yano wrote: > On Wed, 25 Jun 2025 07:59:54 +0200 (CEST) > Johannes Schindelin wrote: > > > On Wed, 25 Jun 2025, Takashi Yano wrote: > > > > > I found the patch blocks non-blocking write in some condition. > >

[PATCH] Cygwin: add release note about `..` symlinks

2025-06-24 Thread Johannes Schindelin
Signed-off-by: Johannes Schindelin --- Published-As: https://github.com/dscho/msys2-runtime/releases/tag/fix-dotdot-native_symlink-relnote-v1 Fetch-It-Via: git fetch https://github.com/dscho/msys2-runtime fix-dotdot-native_symlink-relnote-v1 Here you go, sorry for missing that

Re: [PATCH v2] pipe: fix SSH hang (again)

2025-06-25 Thread Johannes Schindelin
Hi Takashi, On Wed, 25 Jun 2025, Takashi Yano wrote: > On Wed, 25 Jun 2025 14:07:15 +0200 (CEST) > Johannes Schindelin wrote: > > Hi Takashi, > > > > On Wed, 25 Jun 2025, Takashi Yano wrote: > > > > > On Wed, 25 Jun 2025 19:55:34 +0900 > > > Tak

Re: [PATCH v2] pipe: fix SSH hang (again)

2025-06-25 Thread Johannes Schindelin
Hi Takashi, On Wed, 25 Jun 2025, Takashi Yano wrote: > On Wed, 25 Jun 2025 20:51:02 +0900 > Takashi Yano wrote: > > On Wed, 25 Jun 2025 19:55:34 +0900 > > Takashi Yano wrote: > > > Hi Johannes, > > > > > > On Wed, 25 Jun 2025 09:38:17 +0200 (CEST

Re: [PATCH] Cygwin: console: Set ENABLE_PROCESSED_INPUT when disable_master_thread

2025-07-17 Thread Johannes Schindelin
Hi Jeremy, On Mon, 7 Jul 2025, Jeremy Drake wrote: > On Mon, 7 Jul 2025, Johannes Schindelin wrote: > > > fix by a regression test in `winsup/testsuite/`? > > > > For several days, I tried to find a way to reproduce a way to reproduce > > the SSH hang using combi

Re: [PATCH] Cygwin: console: Set ENABLE_PROCESSED_INPUT when disable_master_thread

2025-07-07 Thread Johannes Schindelin
Hi Takashi, On Thu, 3 Jul 2025, Takashi Yano wrote: > On Thu, 3 Jul 2025 11:15:44 +0200 (CEST) > Johannes Schindelin wrote: > > > > On Thu, 3 Jul 2025, Takashi Yano wrote: > > > > > I noticed this patch needs additional fix. Please apply also > > > h

Re: [PATCH] Cygwin: console: Set ENABLE_PROCESSED_INPUT when disable_master_thread

2025-07-03 Thread Johannes Schindelin
Hi Takashi, On Thu, 3 Jul 2025, Takashi Yano wrote: > On Tue, 1 Jul 2025 14:01:45 +0200 (CEST) > Johannes Schindelin wrote: > > > > thank you so much for this patch! I released a new Git for Windows > > version including it: > > https://github.com/git-for-wi

Re: [PATCH] Cygwin: pipe: Fix SSH hang with non-cygwin pipe reader

2025-06-30 Thread Johannes Schindelin
Hi Takashi, On Fri, 27 Jun 2025, Takashi Yano wrote: > On Fri, 27 Jun 2025 12:25:18 +0200 (CEST) > Johannes Schindelin wrote: > > > > Also, pipe_data_available() returns PDA_UNKNOWN rather than 1 when the > > > pipe space estimation fails so that select()

Re: [PATCH] Cygwin: pipe: Fix SSH hang with non-cygwin pipe reader

2025-06-27 Thread Johannes Schindelin
unrelated? Would this not rather be in a separate patch, to make it substantially easier to review for correctness? > Addresses: https://github.com/git-for-windows/git/issues/5682 > Fixes: 7ed9adb356df ("Cygwin: pipe: Switch pipe mode to blocking mode by > default") > Reporte

Re: [PATCH v2] pipe: fix SSH hang (again)

2025-06-26 Thread Johannes Schindelin
Hi Takashi, On Thu, 26 Jun 2025, Takashi Yano wrote: > On Thu, 26 Jun 2025 22:59:26 +0900 > Takashi Yano wrote: > > On Thu, 26 Jun 2025 14:22:49 +0900 > > Takashi Yano wrote: > > > On Wed, 25 Jun 2025 17:57:56 +0200 (CEST) > > > Johannes Schindelin wrote: >

Re: [PATCH v2] Cygwin: pipe: Simplify raw_write() a bit (stop to use chunk)

2025-06-26 Thread Johannes Schindelin
Hi Takashi, On Thu, 26 Jun 2025, Takashi Yano wrote: > On Wed, 25 Jun 2025 14:55:35 +0200 (CEST) > Johannes Schindelin wrote: > > > > On Wed, 25 Jun 2025, Takashi Yano wrote: > > > > > Reviewed-by: > > > Signed-off-by: Takashi Yano > > > >

Re: [PATCH v2] Cygwin: pipe: Fix unexpected blocking mode change by pipe_data_available()

2025-06-26 Thread Johannes Schindelin
ttps://github.com/git-for-windows/git/issues/5682#issuecomment-2997428207 > Fixes: 7ed9adb356df ("Cygwin: pipe: Switch pipe mode to blocking mode by > default") > Reported-by: Andrew Ng (nga888 @github) You may want to use Andrew Ng instead. Other than that, this patch

Re: [PATCH v2 2/3] Cygwin: pipe; Update source comment align with previous commit

2025-06-30 Thread Johannes Schindelin
Hi Takashi, while I usually would like code comments to be in sync with the code (and therefore have it be changed in the same commit), in this instance I totally agree that it made sense to refactor them out into their own patch because they are quite extensive and would otherwise have drowned ou

Re: [PATCH v2 3/3] Cygwin: pipe: Make pipe_data_available() return PDA_UNKNOWN

2025-06-30 Thread Johannes Schindelin
Hi Takashi, On Fri, 27 Jun 2025, Takashi Yano wrote: > ... rather than 1 when the pipe space estimation fails, so that > select() and raw_wrie() can perform appropriate fallback handling. > In select(), even if pipe space is unknown, return writable to avoid > deadlock. Even with select() return

Re: [PATCH v2 1/3] Cygwin: pipe: Fix SSH hang with non-cygwin pipe reader

2025-06-30 Thread Johannes Schindelin
rformed > even if NtQueryInformationFile() returns non-zero value so that > the amount of the writable space in the pipe is always estimated > correctly. > > Addresses: https://github.com/git-for-windows/git/issues/5682 > Fixes: 7ed9adb356df ("Cygwin: pipe: Switch pipe mode t

Re: [PATCH v2] Cygwin: pipe: Simplify raw_write() a bit (Drop using chunk)

2025-06-30 Thread Johannes Schindelin
conflicts with the SSH hang fix (because you dug deeper and identified a different part of the code as needing to be fixed), I'd be very happy if you fast-tracked this patch. Thank you, Johannes > > Reviewed-by: Johannes Schindelin > Signed-off-by: Takashi Yano > --- > wins

Re: [PATCH] Cygwin: console: Set ENABLE_PROCESSED_INPUT when disable_master_thread

2025-07-01 Thread Johannes Schindelin
s: 746c8116dd4f ("Cygwin: console: Allow pasting very long text input.") > Reported-by: Johannes Schindelin > Signed-off-by: Takashi Yano > --- > winsup/cygwin/fhandler/console.cc | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/winsup/

[PATCH 0/2] Handle "app execution aliases"

2021-03-12 Thread Johannes Schindelin via Cygwin-patches
read devolved into a discussion about Thunderbird vs Outlook before long, though). The second patch fixes that, and for good measure, the first patch teaches Cygwin to treat these reparse points as symbolic links. Johannes Schindelin (2): Treat Windows Store's "app execution alia

[PATCH 1/2] Treat Windows Store's "app execution aliases" as symbolic links

2021-03-12 Thread Johannes Schindelin via Cygwin-patches
p, this will result in the following nice output: $ cd $LOCALAPPDATA/Microsoft/WindowsApps/ $ ls -l python3.exe lrwxrwxrwx 1 me 4096 105 Aug 23 2020 python3.exe -> '/c/Program Files/WindowsApps/PythonSoftwareFoundation.Python.3.7_3.7.2544.0_x64__qbz5n2kfra8p0/pyt

[PATCH 2/2] Allow executing Windows Store's "app execution aliases"

2021-03-12 Thread Johannes Schindelin via Cygwin-patches
n is not supported on this reparse point type), and simply skip the logic: Windows Store apps are not Cygwin executables (and even if they were, it is unlikely that they would come with a compatible `cygwin1.dll` or `msys-2.0.dll`). This fixes https://github.com/msys2/MSYS2-packages/issues/

Re: [PATCH 1/2] Treat Windows Store's "app execution aliases" as symbolic links

2021-03-13 Thread Johannes Schindelin via Cygwin-patches
> > > The patch part 2 seems entirely appropriate. > > > Joe L. > > > On 2021-03-12 07:11, Johannes Schindelin via Cygwin-patches wrote: > > When the Windows Store version of Python is installed, so-called "app > > execution aliases" are put into the `PATH`.

Re: [PATCH 1/2] Treat Windows Store's "app execution aliases" as symbolic links

2021-03-15 Thread Johannes Schindelin via Cygwin-patches
hey were plain old symbolic links. Ciao, Johannes > > > Joe L. > > > > On 3/13/2021 4:21 PM, Johannes Schindelin wrote: > > Hi Joe, > > > > On Fri, 12 Mar 2021, Joe Lowe wrote: > > > > > I am skeptical about this patch (part 1), interposing app

Re: [PATCH 1/2] Treat Windows Store's "app execution aliases" as symbolic links

2021-03-22 Thread Johannes Schindelin via Cygwin-patches
Hi Hans-Bernhard, On Mon, 15 Mar 2021, Hans-Bernhard Bröker wrote: > Am 15.03.2021 um 04:19 schrieb Johannes Schindelin via Cygwin-patches: > > > On Sat, 13 Mar 2021, Joe Lowe wrote: > > > > > I agree on the usefulness to the user of showing appexec target > > &g

[PATCH v2 0/2] Handle "app execution aliases"

2021-03-22 Thread Johannes Schindelin via Cygwin-patches
read devolved into a discussion about Thunderbird vs Outlook before long, though). The second patch fixes that, and for good measure, the first patch teaches Cygwin to treat these reparse points as symbolic links. Changes since v1: - Introduce and use `struct _REPARSE_APPEXECLINK_BUFFER`. Jo

[PATCH v2 1/2] Treat Windows Store's "app execution aliases" as symbolic links

2021-03-22 Thread Johannes Schindelin via Cygwin-patches
p, this will result in the following nice output: $ cd $LOCALAPPDATA/Microsoft/WindowsApps/ $ ls -l python3.exe lrwxrwxrwx 1 me 4096 105 Aug 23 2020 python3.exe -> '/c/Program Files/WindowsApps/PythonSoftwareFoundation.Python.3.7_3.7.2544.0_x64__qbz5n2kfra8p0/pyt

[PATCH v2 2/2] Allow executing Windows Store's "app execution aliases"

2021-03-22 Thread Johannes Schindelin via Cygwin-patches
n is not supported on this reparse point type), and simply skip the logic: Windows Store apps are not Cygwin executables (and even if they were, it is unlikely that they would come with a compatible `cygwin1.dll` or `msys-2.0.dll`). This fixes https://github.com/msys2/MSYS2-packages/issues/

<    1   2