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

2024-03-03 Thread Johannes Schindelin
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-by: A

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:

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: 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 0/5] Fix AT_EMPTY_PATH handling

2023-07-26 Thread Johannes Schindelin
his returns a valid path in path_ret. That > > in turn allows to remove the additional path generation code > > from the callers. > > > > Fixes: fa84aa4dd2fb ("Cygwin: fix errno values set by readlinkat") > > Reported-by: Johannes Schindelin > >

Re: [PATCH] Cygwin: dtable: Delete old kludge code for /dev/tty.

2023-07-04 Thread Johannes Schindelin
Hi Takashi, On Tue, 4 Jul 2023, Takashi Yano wrote: > On Mon, 3 Jul 2023 12:52:25 +0200 > Corinna Vinschen wrote: > > > > On Jun 27 22:28, Takashi Yano wrote: > > > > > > diff --git a/winsup/cygwin/dtable.cc b/winsup/cygwin/dtable.cc > > > index 18e0f3097..9427e238e 100644 > > > ---

Re: [PATCH] fchmodat/fstatat: fix regression with empty `pathname`

2023-07-04 Thread Johannes Schindelin
Hi Jeremy, On Wed, 28 Jun 2023, Jeremy Drake wrote: > On Tue, 27 Jun 2023, Johannes Schindelin wrote: > > > In 4b8222983f (Cygwin: fix errno values set by readlinkat, 2023-04-18) > > the code of `readlinkat()` was adjusted to align the `errno` with Linux' > > behavio

Re: [PATCH] fchmodat/fstatat: fix regression with empty `pathname`

2023-07-04 Thread Johannes Schindelin
Hi Corinna, On Mon, 3 Jul 2023, Corinna Vinschen wrote: > Hi Johannes, > > On Jun 27 22:51, Johannes Schindelin wrote: > > In 4b8222983f (Cygwin: fix errno values set by readlinkat, 2023-04-18) > > the code of `readlinkat()` was adjusted to align the `errno` wit

[PATCH v2] fchmodat/fstatat: fix regression with empty `pathname`

2023-07-04 Thread Johannes Schindelin
change mode to rwxr-xr-x: Not a directory With this here fix, things start working as expected again. Fixes: 4b8222983f (Cygwin: fix errno values set by readlinkat, 2023-04-18) Signed-off-by: Johannes Schindelin --- Published-As: https://github.com/dscho/msys2-runtime/releases/tag/fix-tar-xf

[PATCH] fchmodat/fstatat: fix regression with empty `pathname`

2023-06-27 Thread Johannes Schindelin
`readlinkat()`: `fchmodat()` and `fstatat()`. Therefore, these two callers need to be changed to expect `ENOTDIR` in case of an empty `pathname`, too. Signed-off-by: Johannes Schindelin --- Published-As: https://github.com/dscho/msys2-runtime/releases/tag/fix-tar-xf-with-symlinks-cygwin-v1 Fetch-It-Via

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

2023-05-22 Thread Johannes Schindelin
Reportedly Windows 11 build 25*** from Insider changed the current working directory logic a bit, and Cygwin's "magic" (or: "technologically sufficiently advanced") code needs to be adjusted accordingly. This fixes https://github.com/git-for-windows/git/issues/4429 Sig

[PATCH v7 4/4] Do not rely on `getenv ("HOME")`'s path conversion

2023-05-22 Thread Johannes Schindelin
solute paths with drive prefixes, but also UNC paths. Signed-off-by: Johannes Schindelin --- winsup/cygwin/uinfo.cc | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/winsup/cygwin/uinfo.cc b/winsup/cygwin/uinfo.cc index 5e2d88bcd7..21d729d5dc 100644 --- a/winsup/cygwin/u

[PATCH v7 3/4] uinfo: special-case IIS APPPOOL accounts

2023-05-22 Thread Johannes Schindelin
IS APPPOOL accounts are relatively similar to AzureAD accounts in this scenario, let's imitate the latter to support also the former. Reported-by: David Ebbo Helped-by: Corinna Vinschen Signed-off-by: Johannes Schindelin --- winsup/cygwin/uinfo.cc | 107 + 1 fi

[PATCH v7 2/4] Respect `db_home` setting even for SYSTEM/Microsoft accounts

2023-05-22 Thread Johannes Schindelin
We should not blindly set the home directory of the SYSTEM account (or of Microsoft accounts) to `/home/`, especially `/etc/nsswitch.conf` defines `db_home: env`, in which case we want to respect the `HOME` variable. Signed-off-by: Johannes Schindelin --- winsup/cygwin/uinfo.cc | 6 +- 1

[PATCH v7 1/4] Allow deriving the current user's home directory via the HOME variable

2023-05-22 Thread Johannes Schindelin
y: Corinna Vinschen Signed-off-by: Johannes Schindelin --- winsup/cygwin/local_includes/cygheap.h | 3 +- winsup/cygwin/uinfo.cc | 51 ++ winsup/doc/ntsec.xml | 20 +- 3 files changed, 72 insertions(+), 2 deletions(-) diff --gi

[PATCH v7 0/4] Support deriving the current user's home directory via HOME

2023-05-22 Thread Johannes Schindelin
home directory - Using the `PUSER_INFO_3` variant of `get_home()` - Adjusted the commit messages - Added another patch, to support "ad-hoc cloud accounts" Johannes Schindelin (4): Allow deriving the current user's home directory via the HOME variable Respect `db_home` setting even for S

Re: [PATCH v6 4/4] Do not rely on `getenv ("HOME")`'s path conversion

2023-04-06 Thread Johannes Schindelin
Hi Corinna, On Thu, 6 Apr 2023, Corinna Vinschen wrote: > On Apr 4 17:07, Johannes Schindelin wrote: > > In the very early code path where `dll_crt0_1 ()` calls > > `user_shared->initialize ()`, the Cygwin runtime calls `internal_pwsid ()` > > to initialize the

Re: [PATCH v5 2/3] Respect `db_home` setting even for SYSTEM/Microsoft accounts

2023-04-04 Thread Johannes Schindelin
Hi Corinna, On Mon, 3 Apr 2023, Corinna Vinschen wrote: > On Apr 3 16:45, Johannes Schindelin wrote: > > We should not blindly set the home directory of the SYSTEM account (or > > of Microsoft accounts) to `/home/`, especially > > `/etc/nsswitch.conf` defines `db_home: e

Re: [PATCH v5 1/3] Allow deriving the current user's home directory via the HOME variable

2023-04-04 Thread Johannes Schindelin
Hi Corinna, On Mon, 3 Apr 2023, Corinna Vinschen wrote: > On Apr 3 16:44, Johannes Schindelin wrote: > > This patch hails from Git for Windows (where the Cygwin runtime is used > > in the form of a slightly modified MSYS2 runtime), where it is a > > well-established techni

Re: [PATCH v4 3/3] Respect `db_home: env` even when no uid can be determined

2023-04-04 Thread Johannes Schindelin
Hi Corinna, On Mon, 3 Apr 2023, Corinna Vinschen wrote: > On Apr 3 15:57, Johannes Schindelin wrote: > > On Mon, 3 Apr 2023, Corinna Vinschen wrote: > > > > So here is what is going on: > > > > > > > > - The domain is 'IIS APPPOOL' > > > &g

[PATCH v6 4/4] Do not rely on `getenv ("HOME")`'s path conversion

2023-04-04 Thread Johannes Schindelin
of that `/etc/passwd`-formatted line, and instead of a Windows path, we now have a mere drive letter. Let's detect when the `HOME` value is still in Windows format in `fetch_home_env ()`, and convert it in that case. Signed-off-by: Johannes Schindelin --- winsup/cygwin/uinfo.cc | 8 +++- 1 file

[PATCH v6 3/4] uinfo: special-case IIS APPPOOL accounts

2023-04-04 Thread Johannes Schindelin
IS APPPOOL accounts are relatively similar to AzureAD accounts in this scenario, let's imitate the latter to support also the former. Reported-by: David Ebbo Helped-by: Corinna Vinschen Signed-off-by: Johannes Schindelin --- winsup/cygwin/uinfo.cc | 107 + 1 fi

[PATCH v6 2/4] Respect `db_home` setting even for SYSTEM/Microsoft accounts

2023-04-04 Thread Johannes Schindelin
We should not blindly set the home directory of the SYSTEM account (or of Microsoft accounts) to `/home/`, especially `/etc/nsswitch.conf` defines `db_home: env`, in which case we want to respect the `HOME` variable. Signed-off-by: Johannes Schindelin --- winsup/cygwin/uinfo.cc | 6 +- 1

[PATCH v6 1/4] Allow deriving the current user's home directory via the HOME variable

2023-04-04 Thread Johannes Schindelin
y: Corinna Vinschen Signed-off-by: Johannes Schindelin --- winsup/cygwin/local_includes/cygheap.h | 3 +- winsup/cygwin/uinfo.cc | 51 ++ winsup/doc/ntsec.xml | 20 +- 3 files changed, 72 insertions(+), 2 deletions(-) diff --gi

[PATCH v6 0/4] Support deriving the current user's home directory via HOME

2023-04-04 Thread Johannes Schindelin
_path()` dance - Adjusted the documentation to drive home that this only affects the _current_ user's home directory - Using the `PUSER_INFO_3` variant of `get_home()` - Adjusted the commit messages - Added another patch, to support "ad-hoc cloud accounts" Johannes Schindelin (4): Al

[PATCH v5 3/3] Respect `db_home: env` even when no uid can be determined

2023-04-03 Thread Johannes Schindelin
the return value -1, and the subsequent `getpwuid()` call (whose return value's `pw_dir` is used as home directory) needs to be forced to respect `db_home: env`, which this here patch does. Reported-by: David Ebbo Signed-off-by: Johannes Schindelin --- winsup/cygwin/uinfo.cc | 13 +++--

[PATCH v5 2/3] Respect `db_home` setting even for SYSTEM/Microsoft accounts

2023-04-03 Thread Johannes Schindelin
We should not blindly set the home directory of the SYSTEM account (or of Microsoft accounts) to `/home/`, especially `/etc/nsswitch.conf` defines `db_home: env`, in which case we want to respect the `HOME` variable. Signed-off-by: Johannes Schindelin --- winsup/cygwin/uinfo.cc | 6 +- 1

[PATCH v5 1/3] Allow deriving the current user's home directory via the HOME variable

2023-04-03 Thread Johannes Schindelin
y: Corinna Vinschen Signed-off-by: Johannes Schindelin --- winsup/cygwin/local_includes/cygheap.h | 3 +- winsup/cygwin/uinfo.cc | 51 ++ winsup/doc/ntsec.xml | 20 +- 3 files changed, 72 insertions(+), 2 deletions(-) diff --gi

[PATCH v5 0/3] Support deriving the current user's home directory via HOME

2023-04-03 Thread Johannes Schindelin
s - Added another patch, to support "ad-hoc cloud accounts" Johannes Schindelin (3): Allow deriving the current user's home directory via the HOME variable Respect `db_home` setting even for SYSTEM/Microsoft accounts Respect `db_home: env` even when no uid can be determined winsup/c

Re: [PATCH v4 3/3] Respect `db_home: env` even when no uid can be determined

2023-04-03 Thread Johannes Schindelin
Hi Corinna, On Mon, 3 Apr 2023, Corinna Vinschen wrote: > On Apr 3 15:12, Johannes Schindelin wrote: > > > On Mon, 3 Apr 2023, Johannes Schindelin wrote: > > > > > On Tue, 28 Mar 2023, Corinna Vinschen wrote: > > > > > > > On Mar 28 10:17, Johanne

Re: [PATCH v4 2/3] Respect `db_home` setting even for SYSTEM/Microsoft accounts

2023-04-03 Thread Johannes Schindelin
Hi Corinna, On Mon, 3 Apr 2023, Corinna Vinschen wrote: > On Apr 3 08:36, Johannes Schindelin wrote: > > Hi Corinna, > > > > On Tue, 28 Mar 2023, Corinna Vinschen wrote: > > > > > On Mar 28 10:17, Johannes Schindelin wrote: > > > > We should

Re: [PATCH v4 3/3] Respect `db_home: env` even when no uid can be determined

2023-04-03 Thread Johannes Schindelin
Hi Corinna, On Mon, 3 Apr 2023, Johannes Schindelin wrote: > On Tue, 28 Mar 2023, Corinna Vinschen wrote: > > > On Mar 28 10:17, Johannes Schindelin wrote: > > > > diff --git a/winsup/cygwin/uinfo.cc b/winsup/cygwin/uinfo.cc > > > index d493d29b3b..b01bcff5cb

Re: [PATCH v4 3/3] Respect `db_home: env` even when no uid can be determined

2023-04-03 Thread Johannes Schindelin
Hi Corinna, On Mon, 3 Apr 2023, Johannes Schindelin wrote: > On Tue, 28 Mar 2023, Corinna Vinschen wrote: > > > On Mar 28 10:17, Johannes Schindelin wrote: > > > In particular when we cannot figure out a uid for the current user, we > > > should still resp

Re: [PATCH v4 3/3] Respect `db_home: env` even when no uid can be determined

2023-04-03 Thread Johannes Schindelin
Hi Corinna, On Tue, 28 Mar 2023, Corinna Vinschen wrote: > On Mar 28 10:17, Johannes Schindelin wrote: > > In particular when we cannot figure out a uid for the current user, we > > should still respect the `db_home: env` setting. Such a situation occurs > > for example whe

Re: [PATCH v4 1/3] Allow deriving the current user's home directory via the HOME variable

2023-04-03 Thread Johannes Schindelin
Hi Corinna & Jon, On Wed, 29 Mar 2023, Corinna Vinschen wrote: > On Mar 28 15:31, Corinna Vinschen wrote: > > On Mar 28 13:34, Jon Turney wrote: > > > On 28/03/2023 11:35, Corinna Vinschen wrote: > > > > Apart from the doc change, the patch is ok now. > > > > > > The preceding text says "Four

Re: [PATCH v4 2/3] Respect `db_home` setting even for SYSTEM/Microsoft accounts

2023-04-03 Thread Johannes Schindelin
Hi Corinna, On Tue, 28 Mar 2023, Corinna Vinschen wrote: > On Mar 28 10:17, Johannes Schindelin wrote: > > We should not blindly set the home directory of the SYSTEM account (or > > of Microsoft accounts) to /home/SYSTEM, especially not

Re: [PATCH 0/2] Provide virtual /dev/fd and /dev/{stdin, stdout, stderr} symlinks

2023-03-28 Thread Johannes Schindelin
Hi Brian, On Fri, 25 Feb 2022, Brian Inglis wrote: > On 2022-02-21 06:36, Johannes Schindelin wrote: > > These symbolic links are crucial e.g. to support process substitution > > (Bash's > > very nice `<(SOME-COMMAND)` feature). > > > > For various reasons, i

Re: [PATCH 0/2] Provide virtual /dev/fd and /dev/{stdin, stdout, stderr} symlinks

2023-03-28 Thread Johannes Schindelin
Hi Corinna, On Mon, 28 Feb 2022, Corinna Vinschen wrote: > On Feb 28 10:24, Corinna Vinschen wrote: > > On Feb 25 16:46, Johannes Schindelin wrote: > > > On Tue, 22 Feb 2022, Corinna Vinschen wrote: > > > > On Feb 21 14:36, Johannes Schindelin wrote: > >

Re: [PATCH] Cygwin: Improve FAQ on early breakpoint for ASLR

2023-03-28 Thread Johannes Schindelin
Hi Jon, On Wed, 14 Dec 2022, Jon Turney wrote: > On 11/12/2022 14:45, Johannes Schindelin wrote: > > On December 11, 2022 2:54:02 PM GMT+01:00, Jon Turney > > wrote: > > > On 05/12/2022 15:23, Johannes Schindelin wrote: > > > > On Mon, 28 Nov 2022, Corinna Vi

Re: [PATCH v2 1/2] Allow deriving the current user's home directory via the HOME variable

2023-03-28 Thread Johannes Schindelin
Hi Corinna, On Mon, 21 Nov 2022, Corinna Vinschen wrote: > On Nov 18 09:18, Johannes Schindelin wrote: > > Hi Corinna, > > > > On Thu, 10 Nov 2022, Corinna Vinschen wrote: > > > On Nov 10 16:16, Johannes Schindelin wrote: > > > > With this context

[PATCH v4 2/3] Respect `db_home` setting even for SYSTEM/Microsoft accounts

2023-03-28 Thread Johannes Schindelin
We should not blindly set the home directory of the SYSTEM account (or of Microsoft accounts) to /home/SYSTEM, especially not when that value disagrees with what is configured via the `db_home` line in the `/etc/nsswitch.conf` file. Signed-off-by: Johannes Schindelin --- winsup/cygwin/uinfo.cc

[PATCH v4 3/3] Respect `db_home: env` even when no uid can be determined

2023-03-28 Thread Johannes Schindelin
in a cloud scenario. Reported by David Ebbo. Signed-off-by: Johannes Schindelin --- winsup/cygwin/uinfo.cc | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/winsup/cygwin/uinfo.cc b/winsup/cygwin/uinfo.cc index d493d29b3b..b01bcff5cb 100644 --- a/winsup/cygwin

[PATCH v4 1/3] Allow deriving the current user's home directory via the HOME variable

2023-03-28 Thread Johannes Schindelin
$HOMEDRIVE$HOMEPATH` or `$USERPROFILE`. This has the additional advantage that it is much faster than querying the Windows user database. Of course this scheme needs to be opt-in. For that reason, it needs to be activated explicitly via `db_home: env` in `/etc/nsswitch.conf`. Signed-off-by: Johannes

[PATCH v4 0/3] Support deriving the current user's home directory via HOME

2023-03-28 Thread Johannes Schindelin
_conv_path()` dance - Adjusted the documentation to drive home that this only affects the _current_ user's home directory - Using the `PUSER_INFO_3` variant of `get_home()` - Adjusted the commit messages - Added another patch, to support "ad-hoc cloud accounts" Johannes Schindelin (

[PATCH] dumper: avoid linker problem when `libbfd` depends on `libsframe`

2023-02-01 Thread Johannes Schindelin
, link to it in addition to `libbfd`. Signed-off-by: Johannes Schindelin --- Published-As: https://github.com/dscho/msys2-runtime/releases/tag/do-link-libsframe-if-available-v1 Fetch-It-Via: git fetch https://github.com/dscho/msys2-runtime do-link-libsframe-if-available-v1 winsup/configure.ac

Re: [PATCH] Cygwin: Improve FAQ on early breakpoint for ASLR

2022-12-11 Thread Johannes Schindelin
On December 11, 2022 2:54:02 PM GMT+01:00, Jon Turney wrote: >On 05/12/2022 15:23, Johannes Schindelin wrote: >> On Mon, 28 Nov 2022, Corinna Vinschen wrote: >>> On Nov 28 13:00, Jon Turney wrote: >>>> On 15/11/2022 10:46, Corinna Vinschen wrote: >>>>

Re: [PATCH] Cygwin: Improve FAQ on early breakpoint for ASLR

2022-12-05 Thread Johannes Schindelin
Hi, On Mon, 28 Nov 2022, Corinna Vinschen wrote: > On Nov 28 13:00, Jon Turney wrote: > > On 15/11/2022 10:46, Corinna Vinschen wrote: > > > > > > It would be great if we could get used to using the same syntax as the > > > Linux kernel project to document stuff. I'm trying to follow their lead

Re: [PATCH] Cygwin: pty: Fix 'Bad address' error when running 'cmd.exe /c dir'

2022-11-18 Thread Johannes Schindelin
Hi Corinna, On Mon, 24 Oct 2022, Corinna Vinschen wrote: > However, two points: > > - I'm wondering if the patch (both of yours) doesn't actually just cover > a problem in child_info_spawn::worker(). Different runpath values, > depending on the app path being "cmd" or "cmd.exe"? That

Re: [PATCH v2 1/2] Allow deriving the current user's home directory via the HOME variable

2022-11-18 Thread Johannes Schindelin
Hi Corinna, On Thu, 10 Nov 2022, Corinna Vinschen wrote: > On Nov 10 16:16, Johannes Schindelin wrote: > > > On Mon, 24 Oct 2022, Corinna Vinschen wrote: > > > > > On Oct 23 23:04, Johannes Schindelin wrote: > > > > On Tue, 18 Oct 2022, Corinna Vinschen wr

Re: [PATCH v2 1/2] Allow deriving the current user's home directory via the HOME variable

2022-11-10 Thread Johannes Schindelin
Hi Corinna, On Mon, 24 Oct 2022, Corinna Vinschen wrote: > On Oct 23 23:04, Johannes Schindelin wrote: > > On Tue, 18 Oct 2022, Corinna Vinschen wrote: > > [...] > > > That means, the results from the "env" method is equivalent to the > > > "win

Re: [PATCH v2 1/2] Allow deriving the current user's home directory via the HOME variable

2022-10-23 Thread Johannes Schindelin
Hi Corinna, On Tue, 18 Oct 2022, Corinna Vinschen wrote: > On Sep 21 13:58, Johannes Schindelin wrote: > > Hi Corinna, > > > > sorry for the blast from the past, but I am renewing my efforts to > > upstream Git for Windows' patches that can be upstreamed. > >

Re: [PATCH] Fix `Bad address` when running `cmd /c [...]`

2022-10-23 Thread Johannes Schindelin
Hi Takashi, On Sat, 22 Oct 2022, Takashi Yano wrote: > On Sat, 22 Oct 2022 07:55:53 +0200 > Johannes Schindelin wrote: > > It's not very nice to simply drop my work, and then not even link to your > > "counter". > > I am sorry, however, your patch can be i

Re: [PATCH] Cygwin: pty: Fix 'Bad address' error when running 'cmd.exe /c dir'

2022-10-23 Thread Johannes Schindelin
Hi Takashi, On Sat, 22 Oct 2022, Takashi Yano wrote: > On Sat, 22 Oct 2022 07:58:37 +0200 > Johannes Schindelin wrote: > > On October 22, 2022 7:34:20 AM GMT+02:00, Takashi Yano > > wrote: > > >- If the command executed is 'cmd.exe /c [...]', runpath in s

Re: [PATCH] Cygwin: pty: Fix 'Bad address' error when running 'cmd.exe /c dir'

2022-10-21 Thread Johannes Schindelin
On October 22, 2022 7:34:20 AM GMT+02:00, Takashi Yano wrote: >- If the command executed is 'cmd.exe /c [...]', runpath in spawn.cc > will be NULL. In this case, is_console_app(runpath) check causes > access violation. This case also the command executed is obviously > console app.,

Re: [PATCH] Fix `Bad address` when running `cmd /c [...]`

2022-10-21 Thread Johannes Schindelin
On October 22, 2022 7:37:09 AM GMT+02:00, Takashi Yano wrote: >On Sat, 22 Oct 2022 10:54:06 +0900 >Takashi Yano wrote: >> On Sat, 22 Oct 2022 10:36:39 +0900 >> Takashi Yano wrote: >> > On Fri, 21 Oct 2022 23:37:35 +0200 (CEST) >> > Johannes Schindelin wrot

[PATCH] Fix `Bad address` when running `cmd /c [...]`

2022-10-21 Thread Johannes Schindelin
address` error. Let's guard the code properly so that it does not try to look at the file name suffix of `(WCHAR *)NULL`. This fixes https://github.com/msys2/msys2-runtime/issues/108 Signed-off-by: Johannes Schindelin --- Published-As: https://github.com/dscho/msys2-runtime/releases/tag/fix-bad

Re: [PATCH v2 2/2] Respect `db_home` setting even for the SYSTEM account

2022-09-21 Thread Johannes Schindelin
Hi Corinna, On Thu, 17 Dec 2015, Corinna Vinschen wrote: > On Dec 17 19:05, Johannes Schindelin wrote: > > We should not blindly set the home directory of the SYSTEM account to > > /home/SYSTEM, especially not when that value disagrees with what is > > configured v

Re: [PATCH v2 1/2] Allow deriving the current user's home directory via the HOME variable

2022-09-21 Thread Johannes Schindelin
Hi Corinna, sorry for the blast from the past, but I am renewing my efforts to upstream Git for Windows' patches that can be upstreamed. On Thu, 17 Dec 2015, Corinna Vinschen wrote: > On Dec 17 19:05, Johannes Schindelin wrote: > > [...] > > diff --git a/winsup/cygwin/uinfo.cc

[PATCH v3 3/3] Respect `db_home: env` even when no uid can be determined

2022-09-21 Thread Johannes Schindelin
in a cloud scenario. Reported by David Ebbo. Signed-off-by: Johannes Schindelin --- winsup/cygwin/uinfo.cc | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/winsup/cygwin/uinfo.cc b/winsup/cygwin/uinfo.cc index 5e4243fa4e..b79c2b265d 100644 --- a/winsup/cygwin

[PATCH v3 2/3] Respect `db_home` setting even for SYSTEM/Microsoft accounts

2022-09-21 Thread Johannes Schindelin
We should not blindly set the home directory of the SYSTEM account (or of Microsoft accounts) to /home/SYSTEM, especially not when that value disagrees with what is configured via the `db_home` line in the `/etc/nsswitch.conf` file. Signed-off-by: Johannes Schindelin --- winsup/cygwin/uinfo.cc

[PATCH v3 1/3] Allow deriving the current user's home directory via the HOME variable

2022-09-21 Thread Johannes Schindelin
$HOMEDRIVE$HOMEPATH` or `$USERPROFILE`. This has the additional advantage that it is much faster than querying the Windows user database. Of course this scheme needs to be opt-in. For that reason, it needs to be activated explicitly via `db_home: env` in `/etc/nsswitch.conf`. Signed-off-by: Johannes

[PATCH v3 0/3] Support deriving the current user's home directory via HOME

2022-09-21 Thread Johannes Schindelin
another patch, to support "ad-hoc cloud accounts" Johannes Schindelin (3): Allow deriving the current user's home directory via the HOME variable Respect `db_home` setting even for SYSTEM/Microsoft accounts Respect `db_home: env` even when no uid can be determined win

Re: VS Code is missing a few characters when running launch task in Git Bash

2022-07-01 Thread Johannes Schindelin
Hi Orgad, On Fri, 1 Jul 2022, Orgad Shaneh wrote: > On Fri, Jul 1, 2022 at 1:02 AM Orgad Shaneh wrote: > > > > On Sun, May 29, 2022 at 9:00 AM Orgad Shaneh wrote: > > > > > > On Fri, May 27, 2022 at 3:43 PM Takashi Yano > > > wrote: > > > > > > > > On Fri, 27 May 2022 15:22:23 +0300 > > > >

Re: mintty crashes on Windows 7

2022-05-06 Thread Johannes Schindelin
Hi Orgad, On Fri, 6 May 2022, Orgad Shaneh wrote: > Adding @Johannes Schindelin to the loop. Thank you, but that unfortunately does not work on this list. Due to the policy to never reply-to-all, the subsequent replies immediately lost me. The reason why MSYS2's Bash does not dep

Re: [PATCH 0/2] Provide virtual /dev/fd and /dev/{stdin, stdout, stderr} symlinks

2022-02-25 Thread Johannes Schindelin
Hi Corinna, On Tue, 22 Feb 2022, Corinna Vinschen wrote: > On Feb 21 14:36, Johannes Schindelin wrote: > > These symbolic links are crucial e.g. to support process substitution > > (Bash's > > very nice `<(SOME-COMMAND)` feature). > > > > For var

Re: [PATCH] Cygwin: pty, console: Refactor the code processing special keys.

2022-02-25 Thread Johannes Schindelin
Hi Takashi, On Sun, 20 Feb 2022, Takashi Yano wrote: > - This patch commonize the code which processes special keys in pty > and console to improve maintanancibility. I very much welcome the direction. Thank you for working on this! > As a result, some small bugs have been fixed. Whenever I

[PATCH 1/2] Implicitly support the /dev/fd symlink and friends

2022-02-21 Thread Johannes Schindelin
evices. Signed-off-by: Johannes Schindelin --- winsup/cygwin/Makefile.am| 1 + winsup/cygwin/devices.h | 3 +- winsup/cygwin/devices.in | 4 +++ winsup/cygwin/dtable.cc | 3 ++ winsup/cygwin/fhandler.h | 28 + winsup/cygwin/fhandler_dev_fd.c

[PATCH 0/2] Provide virtual /dev/fd and /dev/{stdin,stdout,stderr} symlinks

2022-02-21 Thread Johannes Schindelin
win runtime. Therefore, let's just handle these symbolic links as implicit, virtual ones. If there is appetite for it, I wonder whether we should do something similar for `/dev/shm` and `/dev/mqueue`? Are these even still used in Cygwin? Johannes Schindelin (2): Implicitly support the /dev/fd syml

[PATCH] path_conv: do not get confused by a directory with `.lnk` suffix

2022-01-17 Thread Johannes Schindelin
://github.com/msys2/msys2-runtime/issues/81 Signed-off-by: Johannes Schindelin --- Published-As: https://github.com/dscho/msys2-runtime/releases/tag/dont-confuse-a-xyz.lnk-directory-for-a-lnk-file-cygwin-v1 Fetch-It-Via: git fetch https://github.com/dscho/msys2-runtime dont-confuse-a-xyz.lnk-directory

Re: [PATCH v2] Cygwin: pty: Reduce unecessary input transfer.

2021-12-10 Thread Johannes Schindelin
Hi Takashi, On Fri, 10 Dec 2021, Takashi Yano wrote: > On Fri, 10 Dec 2021 00:05:27 +0100 (CET) > Johannes Schindelin wrote: > > sorry for responding to a patch you sent almost 10 months ago... but... I > > am struggling with it. > > > > First of all, let me describ

Re: [PATCH v2] Cygwin: pty: Reduce unecessary input transfer.

2021-12-09 Thread Johannes Schindelin
Hi Takashi, sorry for responding to a patch you sent almost 10 months ago... but... I am struggling with it. First of all, let me describe the problem I am seeing (see also https://github.com/git-for-windows/git/issues/3579): after upgrading the MSYS2 runtime to v3.3.3 in Git for Windows,

[PATCH] console: handle Unicode surrogate pairs

2021-11-16 Thread Johannes Schindelin
/git-for-windows/git/issues/3281 Signed-off-by: Johannes Schindelin --- This applies without merge conflict all the way back to cygwin_2_7_0-release. winsup/cygwin/fhandler_console.cc | 17 - 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/winsup

Re: [PATCH v6] Cygwin: rewrite cmdline parser

2021-05-14 Thread Johannes Schindelin
Hi, first of all: thank you for working on this. I have run afoul of the (de-)quoting differences between MSVCRT and Cygwin on more than one occasion. Having said this, I hope to make it clear that I care about your work, and I care about helping to make it as good as we can make it together.

Re: Screen clearing in CMD without "Legacy Console Mode"

2021-05-05 Thread Johannes Schindelin via Cygwin
ger used after the Cygwin process returns, that might be a valid world view. But that is probably not a very tenable world view. If Cygwin is unable to handle `TERM=cygwin` correctly when `ENABLE_VIRTUAL_TERMINAL_PROCESSING` is toggled, then Cygwin should definitely, absolutely, with 100% certainty _not_ togg

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

2021-03-23 Thread Johannes Schindelin
Hi Corinna, On Tue, 23 Mar 2021, Corinna Vinschen wrote: > On Mar 22 16:51, Johannes Schindelin via Cygwin-patches wrote: > > When installing e.g. Python via the Windows Store, it is common that the > > `python3.exe` entry in the `PATH` is not actually an executable at all,

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

2021-03-22 Thread Johannes Schindelin via Cygwin-patches
n 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/1943 Signed-off-by:

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

2021-03-22 Thread Johannes Schindelin via Cygwin-patches
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/python.exe' Signed-off-by:

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

2021-03-22 Thread Johannes Schindelin via Cygwin-patches
the thread 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

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

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

2021-03-15 Thread Johannes Schindelin via Cygwin-patches
lain 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 appexec repar

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`. These

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

2021-03-12 Thread Johannes Schindelin via Cygwin-patches
n 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/1943 Signed-off-by:

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

2021-03-12 Thread Johannes Schindelin via Cygwin-patches
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/python.exe' Signed-off-by:

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

2021-03-12 Thread Johannes Schindelin via Cygwin-patches
the thread 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 aliases&q

Re: [PATCH 3/3] fhandler_pty_slave::setup_locale: respect charset == "UTF-8"

2020-09-07 Thread Johannes Schindelin
Hi Takashi, On Sat, 5 Sep 2020, Takashi Yano wrote: > On Fri, 4 Sep 2020 08:23:42 +0200 (CEST) > Johannes Schindelin wrote: > > > > On Fri, 4 Sep 2020, Takashi Yano via Cygwin-patches wrote: > > > > > On Tue, 1 Sep 2020 18:19:16 +0200 (CEST) > > > Joh

Re: [PATCH 3/3] fhandler_pty_slave::setup_locale: respect charset == "UTF-8"

2020-09-07 Thread Johannes Schindelin
Hi, On Mon, 7 Sep 2020, Takashi Yano via Cygwin-patches wrote: > On Mon, 7 Sep 2020 10:26:33 +0200 > Corinna Vinschen wrote: > > Hi Takashi, > > On Sep 5 17:43, Takashi Yano via Cygwin-patches wrote: > > > On Fri, 4 Sep 2020 21:22:35 +0200 > > > Corinna Vinschen wrote: > > > > > > > Btw., the

Re: [PATCH 3/3] fhandler_pty_slave::setup_locale: respect charset == "UTF-8"

2020-09-04 Thread Johannes Schindelin
Hi Takashi, On Fri, 4 Sep 2020, Takashi Yano via Cygwin-patches wrote: > Hi Johannes and Corinna, > > On Tue, 1 Sep 2020 18:19:16 +0200 (CEST) > Johannes Schindelin wrote: > > > When `LANG=en_US.UTF-8`, the detected `LCID` is 0x0409, which is > > correct, but aft

Re: [PATCH 3/3] fhandler_pty_slave::setup_locale: respect charset == "UTF-8"

2020-09-02 Thread Johannes Schindelin
Hi Takashi, On Wed, 2 Sep 2020, Takashi Yano wrote: > On Wed, 2 Sep 2020 08:26:04 +0200 (CEST) > Johannes Schindelin wrote: > > Hi Takashi, > > > > On Wed, 2 Sep 2020, Takashi Yano via Cygwin-patches wrote: > > > > > On Wed, 2 Sep 2020 10:30:14 +0200 >

Re: [PATCH 3/3] fhandler_pty_slave::setup_locale: respect charset == "UTF-8"

2020-09-02 Thread Johannes Schindelin
Hi Takashi, On Wed, 2 Sep 2020, Takashi Yano via Cygwin-patches wrote: > On Wed, 2 Sep 2020 10:30:14 +0200 > Corinna Vinschen wrote: > > On Sep 1 18:19, Johannes Schindelin wrote: > > > When `LANG=en_US.UTF-8`, the detected `LCID` is 0x0409, which is > > > cor

Re: [PATCH 3/3] fhandler_pty_slave::setup_locale: respect charset == "UTF-8"

2020-09-02 Thread Johannes Schindelin
Hi, On Tue, 1 Sep 2020, Johannes Schindelin wrote: > When `LANG=en_US.UTF-8`, the detected `LCID` is 0x0409, which is > correct, but after that (at least if Pseudo Console support is enabled), > we try to find the default code page for that `LCID`, which is ASCII > (437). Subseque

[PATCH 2/3] fhandler_pty_slave::setup_locale: fall back to UTF-8, not ASCII

2020-09-01 Thread Johannes Schindelin
` essentially sets `LANG=$(locale -uU)` (where the `-U` says that `.UTF-8` should be appended). Meaning: we _really_ want to use the UTF-8 code page. Signed-off-by: Johannes Schindelin --- winsup/cygwin/fhandler_tty.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/winsup/cygwin

[PATCH 3/3] fhandler_pty_slave::setup_locale: respect charset == "UTF-8"

2020-09-01 Thread Johannes Schindelin
/MSYS2-packages/issues/2012, https://github.com/rust-lang/cargo/issues/8369, https://github.com/git-for-windows/git/issues/2734, https://github.com/git-for-windows/git/issues/2793, https://github.com/git-for-windows/git/issues/2792, and possibly quite a few others. Signed-off-by: Johannes Schindelin

[PATCH 1/3] fhandler_pty_slave::setup_locale: fix typo

2020-09-01 Thread Johannes Schindelin
Signed-off-by: Johannes Schindelin --- winsup/cygwin/fhandler_tty.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index 6294e2c20..b3458595a 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin

[PATCH 0/3] pty: use the UTF-8 code page by default for non-Cygwin console applications

2020-09-01 Thread Johannes Schindelin
, i.e. in v3.0.x), it is clear to me that using ASCII by default is not desirable. So here are patches to address this. Incidentally, this addresses quite a few tickets in the MSYS2 and Git for Windows projects. Johannes Schindelin (3): fhandler_pty_slave::setup_locale: fix typo

Re: [Patch] Fix incorrect code page when setting console title on Win10

2020-08-26 Thread Johannes Schindelin
Hi Corinna, On Wed, 26 Aug 2020, Corinna Vinschen wrote: > On Aug 26 16:43, 宫大汉 via Cygwin-patches wrote: > > When Cygwin sets console titles on Win10 (has_con_24bit_colors > > !con_is_legacy), > > `WriteConsoleA` is used and causes an error if: > > 1. the environment variable of `LANG` is

[PATCH] setup_pseudoconsole(): handle missing/incorrect helper gracefully

2020-05-02 Thread Johannes Schindelin
that more gracefully: if the process exited without signaling, we cannot use the pseudo console. In that case, let's just fall back to not using it. Signed-off-by: Johannes Schindelin --- It took me three days to bisect why my test build of the MSYS2 runtime hung MinTTY. Three

Re: [PATCH] Cygwin: remove %esp from asm clobber list

2020-02-28 Thread Johannes Schindelin
Hi, On Fri, 28 Feb 2020, Jon Turney wrote: > Mentioning the stack pointer in the clobber list is now a gcc warning. > > We never wanted gcc to try to restore %esp after this (x86-specific) > asm, since the whole point of the inline asm here is to adjust %esp to > satisfy alignment, so remove

Re: [PATCH 4/5] Cygwin: fix GCC 8.3 'asm volatile' errors (fwd)

2019-07-18 Thread Johannes Schindelin
Apparently I ran afoul of some overzealous spam filter: SMTP error from remote server for TEXT command, host: sourceware.org (209.132.180.131) reason: 552 spam score exceeded threshold -- Forwarded message -- Date: Thu, 18 Jul 2019 11:01:33 +0200 (CEST) From: Johannes Schindelin

Re: [PATCH] Fix possible segmentation fault in strnstr() on 64-bit systems

2017-09-14 Thread Johannes Schindelin
Hi Yaakov, On Wed, 13 Sep 2017, Yaakov Selkowitz wrote: > On 2017-09-13 10:44, Johannes Schindelin wrote: > > As of f22054c94d (Modify strnstr.c., 2017-08-30), the strnstr() > > implementation was replaced by a version that segfaults (at least > > sometim

[PATCH] Fix possible segmentation fault in strnstr() on 64-bit systems

2017-09-13 Thread Johannes Schindelin
. Reported as https://github.com/Alexpux/MINGW-packages/issues/2879 in the MSYS2 project. Cc: Sichen Zhao <1473996...@qq.com> Signed-off-by: Johannes Schindelin <johannes.schinde...@gmx.de> --- Published-As: https://github.com/dscho/msys2-runtime/releases/tag/fix-strnstr-segfault-v1 Fetch

  1   2   >