Re: [PATCH] Cygwin: Have tmpfile(3) use O_TMPFILE

2021-02-09 Thread Corinna Vinschen via Cygwin-patches
Hi Mark, On Feb 9 02:50, Mark Geisert wrote: > Per discussion on cygwin-developers, a Cygwin tmpfile(3) implementation > has been added to syscalls.cc. This overrides the one supplied by > newlib. Then the open(2) flag O_TMPFILE was added to the open call that > tmpfile internally makes. > ---

Re: [PATCH 09/11] mount.cc: Implement poor-man's cache

2021-02-04 Thread Corinna Vinschen via Cygwin-patches
On Feb 3 12:38, Ben wrote: > > > On 18-01-2021 12:51, Corinna Vinschen via Cygwin-patches wrote: > > Ok, so hash_prefix reduces the path to a drive letter or the UNC path > > prefix and hashes it. However, what about partitions mounted to a > > subdir of,

Re: [PATCH v2 4/8] syscalls.cc: Implement non-path_conv dependent _unlink_nt

2021-02-04 Thread Corinna Vinschen via Cygwin-patches
On Feb 3 12:03, Ben wrote: > On 26-01-2021 12:34, Corinna Vinschen via Cygwin-patches wrote: > >> + static bool has_posix_unlink_semantics = > >> + wincap.has_posix_unlink_semantics (); > >> + static bool has_posix_unlink_

Re: fhandler_serial.cc: MARK and SPACE parity for serial port

2021-02-02 Thread Corinna Vinschen via Cygwin-patches
On Feb 1 22:26, Marek Smetana via Cygwin-patches wrote: > I'm Sorry, this is my first patch using the mailing list. No worries. Patch pushed. Thanks, Corinna

Re: [PATCH] CYGWIN: Fix resolver debugging output

2021-02-01 Thread Corinna Vinschen via Cygwin-patches
On Feb 1 15:46, Lavrentiev, Anton (NIH/NLM/NCBI) [C] via Cygwin-patches wrote: > > Except, the value has no meaning for ipv6. > > It'll print all 0's :-) But: > > minires does not make use of the _ext field. It does use the conventional > nsaddr_list (which is IPv4), > but only if Windows

Re: Problems with native Unix domain sockets on Win 10/2019

2021-02-01 Thread Corinna Vinschen via Cygwin
On Feb 1 10:04, Ken Brown via Cygwin wrote: > On 1/31/2021 6:30 PM, Michael McMahon wrote: > > Thanks for taking this up again. While I had thought it was a Windows > > bug, and it is arguable, but at least there is a reasonable workaround > > for it. I'd be happy to test an update you have for

Re: [PATCH] CYGWIN: Fix resolver debugging output

2021-02-01 Thread Corinna Vinschen via Cygwin-patches
On Feb 1 14:23, Lavrentiev, Anton (NIH/NLM/NCBI) [C] via Cygwin-patches wrote: > > Please use %ls, %S is non-standard. > > Sure. > > > For instance, write_record appears to handle DNS_TYPE_A, > > but not DNS_TYPE_. > > I can add that, it's not a problem. But indeed, reparsing of Windows

Re: [PATCH 0/4] getdtablesize, OPEN_MAX, etc.

2021-02-01 Thread Corinna Vinschen via Cygwin-patches
On Jan 29 14:24, Ken Brown via Cygwin-patches wrote: > This patchset is an extension of the patch submitted here: > > https://cygwin.com/pipermail/cygwin-patches/2021q1/011060.html > > That patch is included as the first patch in this set. The change to > OPEN_MAX still needs testing to see

Re: [PATCH] Cygwin: getdtablesize: always return OPEN_MAX_MAX

2021-02-01 Thread Corinna Vinschen via Cygwin-patches
On Feb 1 10:50, Corinna Vinschen via Cygwin-patches wrote: > On Jan 28 15:33, Ken Brown via Cygwin-patches wrote: > > On 1/28/2021 11:07 AM, Corinna Vinschen via Cygwin-patches wrote: > > > One problem is that there are some applications in the wild which run > > >

Re: [PATCH] CYGWIN: Fix resolver debugging output

2021-02-01 Thread Corinna Vinschen via Cygwin-patches
Hi Anton, On Jan 29 14:29, Anton Lavrentiev via Cygwin-patches wrote: > - Use %S (instead of %s) when a wide-character output is due; Please use %ls, %S is non-standard. > - Use native byte order for host and add port when doing I/O with DNS server; This puzzeled me a bit so I took another

Re: [PATCH] Cygwin: exceptions.cc: Suspend all threads in sig_handle_tty_stop().

2021-02-01 Thread Corinna Vinschen via Cygwin-patches
On Jan 29 12:46, Takashi Yano via Cygwin-patches wrote: > - Currently, thread created by pthread_create() is not suspended by > the signal SIGTSTP. For example, even if a process with a thread > is suspended by Ctrl-Z, the thread continues running. This patch > fixes the issue. > --- >

Re: [PATCH] Cygwin: console: Align the behaviour against signal with pty.

2021-02-01 Thread Corinna Vinschen via Cygwin-patches
On Jan 29 12:45, Takashi Yano via Cygwin-patches wrote: > - Currently, read() returns -1 with EINTR if the process is suspended > by Ctrl-Z and resumed by fg command, while pty continues to read. > For example, xxd command stops with error "Interrupted system call" > after Ctrl-Z and fg.

Re: [PATCH v3 0/2] Make terminal read() thread-safe.

2021-02-01 Thread Corinna Vinschen via Cygwin-patches
On Jan 28 23:11, Takashi Yano via Cygwin-patches wrote: > Currently read() for console and pty slave are somehow > not thread-safe. These patches fix the issue. > > Takashi Yano (2): > Cygwin: console: Make read() thread-safe. > Cygwin: pty: Make slave read() thread-safe. > >

Re: [PATCH 0/1] Recognizing native Windows AF_UNIX sockets

2021-02-01 Thread Corinna Vinschen via Cygwin-patches
On Jan 30 11:34, Ken Brown via Cygwin-patches wrote: > This patch attempts to fix the problem reported here: > > https://cygwin.com/pipermail/cygwin/2020-September/246362.html > > See also the followup here: > > https://cygwin.com/pipermail/cygwin/2021-January/247666.html > > The problem,

Re: [PATCH] Cygwin: getdtablesize: always return OPEN_MAX_MAX

2021-02-01 Thread Corinna Vinschen via Cygwin-patches
On Jan 28 15:33, Ken Brown via Cygwin-patches wrote: > On 1/28/2021 11:07 AM, Corinna Vinschen via Cygwin-patches wrote: > > One problem is that there are some applications in the wild which run > > loops up to either sysconf(_SC_OPEN_MAX) or OPEN_MAX to handle open > > desc

Re: [PATCH] Cygwin: getdtablesize: always return OPEN_MAX_MAX

2021-02-01 Thread Corinna Vinschen via Cygwin-patches
On Jan 29 14:23, Ken Brown via Cygwin-patches wrote: > On 1/28/2021 5:28 PM, Ken Brown via Cygwin-patches wrote: > > > ...ideally by adding a file include/cygwin/limits.h included by > > > include/limits.h, which defines __OPEN_MAX et al, as required. > > > > I'm not completely sure I follow.  Do

Re: fhandler_serial.cc: MARK and SPACE parity for serial port

2021-02-01 Thread Corinna Vinschen via Cygwin-patches
On Jan 29 23:06, Marek Smetana via Cygwin-patches wrote: > Hi, > > I have modified the patch as recommended and am sending it as an attachment. Great, but can you please attach the entire output of `git format-patch -1' including the commit message? Thanks, Corinna

Re: [PATCH] Cygwin: getdtablesize: always return OPEN_MAX_MAX

2021-01-28 Thread Corinna Vinschen via Cygwin-patches
On Jan 28 17:07, Corinna Vinschen via Cygwin-patches wrote: > On Jan 28 08:42, Ken Brown via Cygwin-patches wrote: > > On 1/28/2021 5:20 AM, Corinna Vinschen via Cygwin-patches wrote: > > > On Jan 27 21:51, Ken Brown via Cygwin-patches wrote: > > > > A

Re: [PATCH] Cygwin: getdtablesize: always return OPEN_MAX_MAX

2021-01-28 Thread Corinna Vinschen via Cygwin-patches
On Jan 28 08:42, Ken Brown via Cygwin-patches wrote: > On 1/28/2021 5:20 AM, Corinna Vinschen via Cygwin-patches wrote: > > On Jan 27 21:51, Ken Brown via Cygwin-patches wrote: > > > According to the Linux man page for getdtablesize(3), the latter is > > > supposed to

Re: [PATCH v7 0/4] Improve pseudo console support.

2021-01-28 Thread Corinna Vinschen via Cygwin-patches
On Jan 28 12:26, Takashi Yano via Cygwin-patches wrote: > The new implementation of pseudo console support by commit bb428520 > provides the important advantages, while there also has been several > disadvantages compared to the previous implementation. > > These patches overturn some of them. >

Re: [PATCH] Cygwin: getdtablesize: always return OPEN_MAX_MAX

2021-01-28 Thread Corinna Vinschen via Cygwin-patches
On Jan 27 21:51, Ken Brown via Cygwin-patches wrote: > According to the Linux man page for getdtablesize(3), the latter is > supposed to return "the maximum number of files a process can have > open, one more than the largest possible value for a file descriptor." > The constant OPEN_MAX_MAX is

Re: fhandler_serial.cc: MARK and SPACE parity for serial port

2021-01-28 Thread Corinna Vinschen via Cygwin-patches
Oh, btw... On Jan 28 11:08, Corinna Vinschen via Cygwin-patches wrote: > Hi Marek, > > thanks for the patch. [...] > > index 17e8d83a3..933851c21 100644 > > --- a/winsup/cygwin/include/sys/termios.h > > +++ b/winsup/cygwin/include/sys/termios.h > > @

Re: fhandler_serial.cc: MARK and SPACE parity for serial port

2021-01-28 Thread Corinna Vinschen via Cygwin-patches
Hi Marek, thanks for the patch. This is a patch adding functionality so it's not trivial. Would you mind to express your willingness to put this patch as well as further patches under 2-clause BSD license per the "Before you get started" section of https://cygwin.com/contrib.html? A few minor

Re: [PATCH v2] Cygwin: fchmodat: add limited support for AT_SYMLINK_NOFOLLOW

2021-01-28 Thread Corinna Vinschen via Cygwin-patches
On Jan 27 13:53, Ken Brown via Cygwin-patches wrote: > Allow fchmodat with the AT_SYMLINK_NOFOLLOW flag to succeed on > non-symlinks. Previously it always failed, as it does on Linux. But > POSIX permits it to succeed on non-symlinks even if it fails on > symlinks. > > The reason for following

Re: [PATCH] Cygwin: fchmodat: add limited support for AT_SYMLINK_NOFOLLOW

2021-01-27 Thread Corinna Vinschen via Cygwin-patches
On Jan 27 08:22, Ken Brown via Cygwin-patches wrote: > On 1/27/2021 7:40 AM, Corinna Vinschen via Cygwin-patches wrote: > > On Jan 26 16:30, Ken Brown via Cygwin-patches wrote: > > > Allow fchmodat with the AT_SYMLINK_NOFOLLOW flag to succeed on > > > non-symlinks.

Re: [PATCH] Cygwin: fchmodat: add limited support for AT_SYMLINK_NOFOLLOW

2021-01-27 Thread Corinna Vinschen via Cygwin-patches
On Jan 26 16:30, Ken Brown via Cygwin-patches wrote: > Allow fchmodat with the AT_SYMLINK_NOFOLLOW flag to succeed on > non-symlinks. Previously it always failed, as it does on Linux. But > POSIX permits it to succeed on non-symlinks even if it fails on > symlinks. > > The reason for following

Re: [PATCH] Cygwin: chown: make sure ctime gets updated when necessary

2021-01-26 Thread Corinna Vinschen via Cygwin-patches
On Jan 25 14:16, Ken Brown via Cygwin-patches wrote: > On 1/25/2021 1:57 PM, Corinna Vinschen via Cygwin-patches wrote: > > On Jan 25 12:24, Ken Brown via Cygwin-patches wrote: > > > Following POSIX, ensure that ctime is updated if chown succeeds, > > > unless the new o

Re: [PATCH v2 7/8] dir.cc: Try unlink_nt first

2021-01-26 Thread Corinna Vinschen via Cygwin-patches
On Jan 20 17:10, Ben Wijen wrote: > Speedup deletion of directories. > --- > winsup/cygwin/dir.cc | 12 ++-- > 1 file changed, 10 insertions(+), 2 deletions(-) > > diff --git a/winsup/cygwin/dir.cc b/winsup/cygwin/dir.cc > index 7762557d6..470f83aee 100644 > --- a/winsup/cygwin/dir.cc >

Re: [PATCH v2 6/8] syscalls.cc: Expose shallow-pathconv unlink_nt

2021-01-26 Thread Corinna Vinschen via Cygwin-patches
On Jan 20 17:10, Ben Wijen wrote: > Not having to query file information improves unlink speed. > --- > winsup/cygwin/syscalls.cc | 78 ++- > 1 file changed, 52 insertions(+), 26 deletions(-) > > diff --git a/winsup/cygwin/syscalls.cc

Re: [PATCH v2 4/8] syscalls.cc: Implement non-path_conv dependent _unlink_nt

2021-01-26 Thread Corinna Vinschen via Cygwin-patches
Hi Ben, ok, this is strong stuff, and apart from a couple of formatting issues, we should really discuss if a couple of things are feasible at all. On Jan 20 17:10, Ben Wijen wrote: > Implement _unlink_nt: wich does not depend on patch_conv > --- > winsup/cygwin/fhandler_disk_file.cc | 4 +- >

Re: [PATCH v3 2/8] syscalls.cc: Deduplicate remove

2021-01-25 Thread Corinna Vinschen via Cygwin-patches
On Jan 22 16:47, Ben Wijen wrote: > The remove code is already in the _remove_r function. > So, just call the _remove_r function. > --- > winsup/cygwin/syscalls.cc | 17 - > 1 file changed, 4 insertions(+), 13 deletions(-) Pushed. Thanks, Corinna

Re: [PATCH] Cygwin: chown: make sure ctime gets updated when necessary

2021-01-25 Thread Corinna Vinschen via Cygwin-patches
On Jan 25 12:24, Ken Brown via Cygwin-patches wrote: > Following POSIX, ensure that ctime is updated if chown succeeds, > unless the new owner is specified as (uid_t)-1 and the new group is > specified as (gid_t)-1. Previously, ctime was unchanged whenever the > owner and group were both

Re: [PATCH] Cygwin: console: Add missing guard regarding attach_mutex.

2021-01-25 Thread Corinna Vinschen via Cygwin-patches
On Jan 25 18:18, Takashi Yano via Cygwin-patches wrote: > - The commit a545 did not fix the problem enough. This patch > provides additional guard for the issue. > --- > winsup/cygwin/fhandler_console.cc | 27 +++ > 1 file changed, 27 insertions(+) Pushed. Thanks,

Re: [PATCH v2 2/8] syscalls.cc: Deduplicate remove

2021-01-22 Thread Corinna Vinschen via Cygwin-patches
On Jan 20 17:10, Ben Wijen wrote: > The remove code is already in the _remove_r function. > So, just call the _remove_r function. > --- > winsup/cygwin/syscalls.cc | 17 - > 1 file changed, 4 insertions(+), 13 deletions(-) > > diff --git a/winsup/cygwin/syscalls.cc

Re: [PATCH v2 0/4] Improve pseudo console support.

2021-01-22 Thread Corinna Vinschen via Cygwin-patches
Hi Takashi, On Jan 22 05:58, Takashi Yano via Cygwin-patches wrote: > The new implementation of pseudo console support by commit bb428520 > provides the important advantages, while there also has been several > disadvantages compared to the previous implementation. > > These patches overturn

Re: [PATCH v2 0/4] Improve pseudo console support.

2021-01-22 Thread Corinna Vinschen via Cygwin-patches
On Jan 22 05:58, Takashi Yano via Cygwin-patches wrote: > The new implementation of pseudo console support by commit bb428520 > provides the important advantages, while there also has been several > disadvantages compared to the previous implementation. > > These patches overturn some of them. >

Re: [PATCH] Cygwin: normalize_posix_path: fix error handling when .. is encountered

2021-01-22 Thread Corinna Vinschen via Cygwin-patches
On Jan 20 10:40, Ken Brown via Cygwin-patches wrote: > When .. is in the source path and the path prefix exists but is not a > directory, return ENOTDIR instead of ENOENT. This fixes a failing > gnulib test of realpath(3). > > Addresses:

Re: [PATCH] Cygwin: ptsname_r: always return an error number on failure

2021-01-22 Thread Corinna Vinschen via Cygwin-patches
On Jan 21 17:48, Ken Brown via Cygwin-patches wrote: > On 1/20/2021 1:00 PM, Ken Brown via Cygwin-patches wrote: > > Following Linux, return ENOTTY on a bad file descriptor and also set > > errno to ENOTTY. > > > > Previously 0 was returned and errno was set to EBADF. Returning 0 > > violates

Re: [PATCH] Cygwin: pty: Reduce buffer size in get_console_process_id().

2021-01-20 Thread Corinna Vinschen via Cygwin-patches
On Jan 20 19:40, Takashi Yano via Cygwin-patches wrote: > On Wed, 20 Jan 2021 10:50:24 +0100 > Corinna Vinschen wrote: > > On Jan 20 09:57, Takashi Yano via Cygwin-patches wrote: > > > - The buffer used in get_console_process_id(), introduced by commit > > > 72770148, is too large and

Re: [PATCH] Cygwin: console: Fix "Bad file descriptor" error in script command.

2021-01-20 Thread Corinna Vinschen via Cygwin-patches
On Jan 20 18:16, Takashi Yano via Cygwin-patches wrote: > - After the commit 72770148, script command exits occasionally with > the error "Bad file descriptor" if it is started in console on Win7 > and non-cygwin process is executed. This patch fixes the issue. > --- >

Re: [PATCH] Cygwin: pty: Reduce buffer size in get_console_process_id().

2021-01-20 Thread Corinna Vinschen via Cygwin-patches
On Jan 20 09:57, Takashi Yano via Cygwin-patches wrote: > - The buffer used in get_console_process_id(), introduced by commit > 72770148, is too large and ERROR_NOT_ENOUGH_MEMORY occurs in Win7. Huh, funny! Will we ever be happy with just 8192 processes per console? :) > Therefore, the

Re: [PATCH] Cygwin: pty: Lessen the side effect of workaround for rlwarp.

2021-01-19 Thread Corinna Vinschen via Cygwin-patches
On Jan 19 18:27, Takashi Yano via Cygwin-patches wrote: > - This patch lessens the side effect of the workaround for rlwrap > introduced by commit 4e16b033. > --- > winsup/cygwin/fhandler_tty.cc | 16 > 1 file changed, 12 insertions(+), 4 deletions(-) > > diff --git

Re: [PATCH] Cygwin: spawn.cc: Fix typo in comment by commit 974e6d76.

2021-01-19 Thread Corinna Vinschen via Cygwin-patches
On Jan 19 03:45, Takashi Yano via Cygwin-patches wrote: > --- > winsup/cygwin/spawn.cc | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/winsup/cygwin/spawn.cc b/winsup/cygwin/spawn.cc > index 42044ab53..d03492ee6 100644 > --- a/winsup/cygwin/spawn.cc > +++

Re: [PATCH 11/11] dir.cc: Try unlink_nt first

2021-01-19 Thread Corinna Vinschen via Cygwin-patches
On Jan 18 18:07, Ben wrote: > > > On 18-01-2021 13:13, Corinna Vinschen via Cygwin-patches wrote: > > > > Your code is skipping the safety checks and the has_dot_last_component() > > check. The latter implements a check required by POSIX. Skipping > > it intro

Re: [PATCH 08/11] path.cc: Allow to skip filesystem checks

2021-01-19 Thread Corinna Vinschen via Cygwin-patches
On Jan 18 18:15, Ben wrote: > > > On 18-01-2021 12:36, Corinna Vinschen via Cygwin-patches wrote: > > On Jan 15 14:45, Ben Wijen wrote: > > > > Without any code setting the flag, this doesn't seem to make any > > sense. At least the commit mess

Re: [PATCH] Cygwin: pty: Set input_available_event only for cygwin pipe.

2021-01-18 Thread Corinna Vinschen via Cygwin-patches
On Jan 19 00:00, Takashi Yano via Cygwin-patches wrote: > Hi Corinna, > > On Fri, 15 Jan 2021 18:26:31 +0900 > Takashi Yano wrote: > > - cat exits immediately in the following senario. > > 1) Execute env CYGWIN=disable_pcon script > > 2) Execute cmd.exe > > 3) Execute cat in cmd.exe.

Re: [PATCH 05/11] Cygwin: Move post-dir unlink check

2021-01-18 Thread Corinna Vinschen via Cygwin-patches
On Jan 18 15:31, Ben wrote: > On 18-01-2021 12:08, Corinna Vinschen via Cygwin-patches wrote: > > On Jan 15 14:45, Ben Wijen wrote: > >> Move post-dir unlink check from > >> fhandler_disk_file::rmdir to _unlink_nt > > > > Why? It's not much of a pr

Re: [PATCH 02/11] syscalls.cc: Deduplicate _remove_r

2021-01-18 Thread Corinna Vinschen via Cygwin-patches
On Jan 18 14:51, Ben wrote: > On 18-01-2021 14:04, Corinna Vinschen via Cygwin-patches wrote: > > What about this instead? It should be better optimizable: > > > Hmmm: > * _remove_r should still set reent->_errno This is redundant: errno == (*__errno ()) == _REE

Re: [PATCH 01/11] syscalls.cc: unlink_nt: Try FILE_DISPOSITION_IGNORE_READONLY_ATTRIBUTE first

2021-01-18 Thread Corinna Vinschen via Cygwin-patches
On Jan 18 15:30, Ben wrote: > > > On 18-01-2021 13:22, Corinna Vinschen via Cygwin-patches wrote: > > On Jan 18 13:11, Ben wrote: > >> > >> > >> On 18-01-2021 11:45, Corinna Vinschen via Cygwin-patches wrote: > >>> Rather than calling NtSetI

Re: [PATCH v3] Cygwin: pty: Prevent pty from changing code page of parent console.

2021-01-18 Thread Corinna Vinschen via Cygwin-patches
On Jan 18 22:10, Takashi Yano via Cygwin-patches wrote: > - After commit 232fde0e, pty changes console code page when the first > non-cygwin app is executed. If pty is started in real console device, > pty changes the code page of root console. This causes very annoying > result because

Re: [PATCH 02/11] syscalls.cc: Deduplicate _remove_r

2021-01-18 Thread Corinna Vinschen via Cygwin-patches
On Jan 18 13:40, Ben wrote: > On 18-01-2021 11:56, Corinna Vinschen via Cygwin-patches wrote: > > Hmm, you're adding another function call to the call stack. Doesn't > > that slow down _remove_r rather than speeding it up? Ok, this function > > is called from _tmpfile_r/

Re: [PATCH v2 4/5] Cygwin: pty: Prevent pty from changing code page of parent console.

2021-01-18 Thread Corinna Vinschen via Cygwin-patches
On Jan 18 21:57, Takashi Yano via Cygwin-patches wrote: > On Mon, 18 Jan 2021 13:39:01 +0100 > Corinna Vinschen wrote: > > Sorry if I'm slow, but I was just mulling over this code snippet again, > > and I was wondering if we couldn't do without the HeapAlloc loop. > > Assuming you use a

Re: [PATCH] Cygwin: Interim malloc speedup

2021-01-18 Thread Corinna Vinschen via Cygwin-patches
Hi Mark, On Jan 17 22:47, Mark Geisert wrote: > Hi Corinna, > Happy New Year back at you! I'm very glad to see you posting again! Yeah, I took a longer timeout over the holiday season. > Corinna Vinschen via Cygwin-patches wrote: > > Hi Mark, > > > > Happy New Yea

Re: [PATCH v2 4/5] Cygwin: pty: Prevent pty from changing code page of parent console.

2021-01-18 Thread Corinna Vinschen via Cygwin-patches
Hi Takashi, On Jan 18 20:24, Takashi Yano via Cygwin-patches wrote: > @@ -59,6 +59,46 @@ struct pipe_reply { >DWORD error; > }; > > +extern HANDLE attach_mutex; /* Defined in fhandler_console.cc */ > + > +static DWORD > +get_console_process_id (DWORD pid, bool match) > +{ > + DWORD list1;

Re: [PATCH 01/11] syscalls.cc: unlink_nt: Try FILE_DISPOSITION_IGNORE_READONLY_ATTRIBUTE first

2021-01-18 Thread Corinna Vinschen via Cygwin-patches
On Jan 18 13:11, Ben wrote: > > > On 18-01-2021 11:45, Corinna Vinschen via Cygwin-patches wrote: > > Rather than calling NtSetInformationFile here again, we should rather > > just skip the transaction stuff on 1809 and later. I'd suggest adding > > an

Re: [PATCH 11/11] dir.cc: Try unlink_nt first

2021-01-18 Thread Corinna Vinschen via Cygwin-patches
On Jan 15 14:45, Ben Wijen wrote: > Speedup deletion of directories. > --- > winsup/cygwin/dir.cc | 6 ++ > 1 file changed, 6 insertions(+) > > diff --git a/winsup/cygwin/dir.cc b/winsup/cygwin/dir.cc > index f912a9e47..2e7da3638 100644 > --- a/winsup/cygwin/dir.cc > +++

Re: [PATCH 09/11] mount.cc: Implement poor-man's cache

2021-01-18 Thread Corinna Vinschen via Cygwin-patches
On Jan 15 14:45, Ben Wijen wrote: > Try to avoid NtQueryVolumeInformationFile. > --- > winsup/cygwin/mount.cc | 78 -- > winsup/cygwin/mount.h | 2 +- > winsup/cygwin/path.cc | 2 +- > winsup/cygwin/path.h | 1 + > 4 files changed, 56 insertions(+),

Re: [PATCH 08/11] path.cc: Allow to skip filesystem checks

2021-01-18 Thread Corinna Vinschen via Cygwin-patches
On Jan 15 14:45, Ben Wijen wrote: > When file attributes are of no concern, > there is no point to query them. Without any code setting the flag, this doesn't seem to make any sense. At least the commit message should reflect on the reasons for this change. > --- > winsup/cygwin/path.cc | 3

Re: [PATCH 06/11] cxx.cc: Fix dynamic initialization for static local variables

2021-01-18 Thread Corinna Vinschen via Cygwin-patches
On Jan 15 14:45, Ben Wijen wrote: > The old implementation for __cxa_guard_acquire did not return 1, > therefore dynamic initialization was never performed. > > If concurrent-safe dynamic initialisation is ever needed, CXX ABI > must be followed when re-implementing __cxa_guard_acquire (et al.) >

Re: [PATCH 05/11] Cygwin: Move post-dir unlink check

2021-01-18 Thread Corinna Vinschen via Cygwin-patches
On Jan 15 14:45, Ben Wijen wrote: > Move post-dir unlink check from > fhandler_disk_file::rmdir to _unlink_nt Why? It's not much of a problem, codewise, but the commit message could be improved here. Corinna

Re: [PATCH 04/11] syscalls.cc: Use EISDIR

2021-01-18 Thread Corinna Vinschen via Cygwin-patches
On Jan 15 14:45, Ben Wijen wrote: > This is the non-POSIX value returned by Linux since 2.1.132. > --- > winsup/cygwin/syscalls.cc | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc > index 227d1a911..043ccdb99 100644 >

Re: [PATCH 03/11] syscalls.cc: Fix num_links

2021-01-18 Thread Corinna Vinschen via Cygwin-patches
On Jan 15 14:45, Ben Wijen wrote: > NtQueryInformationFile on fh_ro needs FILE_READ_ATTRIBUTES > to succeed. > --- > winsup/cygwin/syscalls.cc | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc > index

Re: [PATCH 02/11] syscalls.cc: Deduplicate _remove_r

2021-01-18 Thread Corinna Vinschen via Cygwin-patches
On Jan 15 14:45, Ben Wijen wrote: > The _remove_r code is already in the remove function. > Therefore, just call the remove function and make > sure errno is set correctly in the reent struct. > --- > winsup/cygwin/syscalls.cc | 15 ++- > 1 file changed, 6 insertions(+), 9

Re: [PATCH 01/11] syscalls.cc: unlink_nt: Try FILE_DISPOSITION_IGNORE_READONLY_ATTRIBUTE first

2021-01-18 Thread Corinna Vinschen via Cygwin-patches
Hi Ben, after venting that I missed this flag, back to the patch itself: On Jan 15 14:45, Ben Wijen wrote: > --- > winsup/cygwin/ntdll.h | 3 ++- > winsup/cygwin/syscalls.cc | 20 > 2 files changed, 18 insertions(+), 5 deletions(-) > > diff --git

Re: [PATCH 01/11] syscalls.cc: unlink_nt: Try FILE_DISPOSITION_IGNORE_READONLY_ATTRIBUTE first

2021-01-18 Thread Corinna Vinschen via Cygwin-patches
Hi Ben, On Jan 15 14:45, Ben Wijen wrote: > --- > winsup/cygwin/ntdll.h | 3 ++- > winsup/cygwin/syscalls.cc | 20 > 2 files changed, 18 insertions(+), 5 deletions(-) > > diff --git a/winsup/cygwin/ntdll.h b/winsup/cygwin/ntdll.h > index d4f6aaf45..7eee383dd 100644 >

Re: [PATCH] Cygwin: document a recent bug fix

2021-01-18 Thread Corinna Vinschen via Cygwin-patches
On Jan 15 12:52, Ken Brown via Cygwin-patches wrote: > This documents commit aec64798, "Cygwin: add flag to indicate reparse > points unknown to WinAPI". > --- > winsup/cygwin/release/3.2.0 | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/winsup/cygwin/release/3.2.0

Re: [PATCH 4/5] Cygwin: pty: Prevent pty from changing code page of parent console.

2021-01-18 Thread Corinna Vinschen via Cygwin-patches
Hi Takashi, I'm going to push patches 1 - 3. In terms of patch 4 I have a few questions: On Jan 15 17:32, Takashi Yano via Cygwin-patches wrote: > @@ -2185,7 +2185,7 @@ private: >bool send_winch_maybe (); >void setup (); >bool set_unit (); > - static bool need_invisible (); > +

Re: tar 1.33 symlinks : Cannot change mode to...

2021-01-13 Thread Corinna Vinschen via Cygwin
On Jan 13 11:52, Ken Brown via Cygwin wrote: > On 1/11/2021 2:57 PM, Morgan King via Cygwin wrote: > > Hello, > > > > I am experiencing the same issue with tar and I am able to reproduce it > > following the steps at: > > https://lists.gnu.org/archive/html/bug-tar/2011-08/msg6.html > > > >

Re: tar 1.33 symlinks : Cannot change mode to...

2021-01-12 Thread Corinna Vinschen via Cygwin
On Jan 12 12:49, Ken Brown via Cygwin wrote: > On 1/12/2021 12:15 PM, Corinna Vinschen wrote: > > On Jan 12 11:55, Ken Brown via Cygwin wrote: > > > [...] > > > This appears to be a bug in fstat in 32-bit Cygwin. Here's what I'm > > > seeing > > > in gdb, using an unoptimized build of

Re: tar 1.33 symlinks : Cannot change mode to...

2021-01-12 Thread Corinna Vinschen via Cygwin
On Jan 12 11:55, Ken Brown via Cygwin wrote: > On 1/11/2021 6:50 PM, Ken Brown via Cygwin wrote: > > On 1/11/2021 2:57 PM, Morgan King via Cygwin wrote: > > > Hello, > > > > > > I am experiencing the same issue with tar and I am able to reproduce > > > it following the steps at: > > >

Re: [PATCH] Cygwin: Interim malloc speedup

2021-01-11 Thread Corinna Vinschen via Cygwin-patches
Hi Mark, Happy New Year! On Dec 21 20:53, Mark Geisert wrote: > Replaces function-level lock with data-level lock provided by existing > dlmalloc. Sets up to enable dlmalloc's MSPACES, but does not yet enable > them due to visible but uninvestigated issues. > > Single-thread applications may

Re: [PATCH] fhandler_proc.cc(format_proc_cpuinfo): report Intel SGX bits

2020-12-17 Thread Corinna Vinschen via Cygwin-patches
On Dec 17 00:11, Brian Inglis wrote: > Update to Linux next 5.10 cpuinfo flags for Intel SDM 36.7.1 Software > Guard Extensions, and 38.1.4 SGX Launch Control Configuration. > Launch control restricts what software can run with enclave protections, > which helps protect the system from bad

Re: [PATCH] Cygwin: pty: Revise the workaround for rlwrap.

2020-12-16 Thread Corinna Vinschen via Cygwin-patches
On Dec 16 18:10, Takashi Yano via Cygwin-patches wrote: > - Previous workaround has a problem that screen is distorted if up > arrow key is pressed at the first line after running "rlwrap cmd". > This patch fixes the issue. > --- > winsup/cygwin/fhandler_tty.cc | 4 ++-- > 1 file changed, 2

Re: [PATCH] Cygwin: pty: Check response for CSI6n more strictly.

2020-12-16 Thread Corinna Vinschen via Cygwin-patches
On Dec 16 18:10, Takashi Yano via Cygwin-patches wrote: > - Previous code to read response for CSI6n allows invalid response > such as "CSI Pl; Pc H" other than correct response "CSI Pl; Pc R". > With this patch, the response is checked more strictly. > --- > winsup/cygwin/fhandler_tty.cc | 8

Re: [PATCH] Cygwin: pty: Skip term_has_pcon_cap() if pseudo console is disabled.

2020-12-14 Thread Corinna Vinschen via Cygwin-patches
On Dec 14 17:25, Takashi Yano via Cygwin-patches wrote: > - This patch skips unnecessary term_has_pcon_cap() call if pseudo > console is disabled. > --- > winsup/cygwin/fhandler_tty.cc | 2 -- > winsup/cygwin/spawn.cc| 2 +- > 2 files changed, 1 insertion(+), 3 deletions(-) > > diff

Re: [PATCH v2] cygwin: use CREATE_DEFAULT_ERROR_MODE in spawn

2020-12-10 Thread Corinna Vinschen via Cygwin-patches
On Dec 9 11:27, Jeremy Drake via Cygwin-patches wrote: > This allows native processes to get Windows-default error handling > behavior (such as invoking the registered JIT debugger). > > --- > winsup/cygwin/spawn.cc | 7 +++ > 1 file changed, 7 insertions(+) > > diff --git

Re: [PATCH 1/1] cygwin: use CREATE_DEFAULT_ERROR_MODE in spawn

2020-12-09 Thread Corinna Vinschen via Cygwin-patches
On Dec 8 11:58, Jeremy Drake via Cygwin-patches wrote: > On Tue, 8 Dec 2020, Jon Turney wrote: > > On 07/12/2020 09:43, Corinna Vinschen wrote: > > > On Dec 4 10:35, Jeremy Drake via Cygwin-patches wrote: > > > > On Fri, 4 Dec 2020, Corinna Vin

Re: [PATCH] Cygwin: Allow to set SO_PEERCRED zero (v2)

2020-12-08 Thread Corinna Vinschen via Cygwin-patches
On Dec 8 10:47, Corinna Vinschen via Cygwin-patches wrote: > Hi Mark, > > On Dec 7 19:25, Mark Geisert wrote: > > Hi Corinna, > > > > Corinna Vinschen via Cygwin-patches wrote: > > > On Dec 7 16:30, Corinna Vinschen via Cygwin-patches wrote: > &g

Re: [PATCH] Cygwin: Allow to set SO_PEERCRED zero (v2)

2020-12-08 Thread Corinna Vinschen via Cygwin-patches
Hi Mark, On Dec 7 19:25, Mark Geisert wrote: > Hi Corinna, > > Corinna Vinschen via Cygwin-patches wrote: > > On Dec 7 16:30, Corinna Vinschen via Cygwin-patches wrote: > > > On Dec 7 02:29, Mark Geisert wrote: > > > > The existing code errors

Re: [PATCH] Cygwin: Allow to set SO_PEERCRED zero (v2)

2020-12-07 Thread Corinna Vinschen via Cygwin-patches
On Dec 7 16:30, Corinna Vinschen via Cygwin-patches wrote: > On Dec 7 02:29, Mark Geisert wrote: > > The existing code errors as EINVAL any attempt to set a value for > > SO_PEERCRED via setsockopt() on an AF_UNIX/AF_LOCAL socket. But to > > enable the workaround set_n

Re: [PATCH] Cygwin: Allow to set SO_PEERCRED zero (v2)

2020-12-07 Thread Corinna Vinschen via Cygwin-patches
On Dec 7 02:29, Mark Geisert wrote: > The existing code errors as EINVAL any attempt to set a value for > SO_PEERCRED via setsockopt() on an AF_UNIX/AF_LOCAL socket. But to > enable the workaround set_no_getpeereid behavior for Python one has > to be able to set SO_PEERCRED to zero. Ergo, this

Re: [PATCH 1/1] cygwin: use CREATE_DEFAULT_ERROR_MODE in spawn

2020-12-07 Thread Corinna Vinschen via Cygwin-patches
On Dec 4 10:35, Jeremy Drake via Cygwin-patches wrote: > On Fri, 4 Dec 2020, Corinna Vinschen via Cygwin-patches wrote: > > > I'm not happy about a new CYGWIN option. > > > > Wouldn't it make sense, perhaps, to switch to CREATE_DEFAULT_ERROR_MODE > > for all n

Re: [PATCH] Fix trace output for getdomainname()

2020-12-07 Thread Corinna Vinschen via Cygwin-patches
On Dec 4 17:58, Anton Lavrentiev via Cygwin-patches wrote: > --- > winsup/cygwin/net.cc | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/winsup/cygwin/net.cc b/winsup/cygwin/net.cc > index 724e787fe..cec0a70cc 100644 > --- a/winsup/cygwin/net.cc > +++

Re: [PATCH] Cygwin: Launch cygmagic with bash, not sh

2020-12-07 Thread Corinna Vinschen via Cygwin-patches
On Dec 6 22:17, Mark Geisert wrote: > On some systems /bin/sh is not /bin/bash and cygmagic has bash-isms in > it. So even though cygmagic has a /bin/bash shebang, it also needs to be > launched with bash from within Makefile.in. > > --- > winsup/cygwin/Makefile.in | 4 ++-- > 1 file changed,

Re: [PATCH] Cygwin: Allow to set SO_PEERCRED zero

2020-12-07 Thread Corinna Vinschen via Cygwin-patches
Hi Mark, On Dec 6 22:28, Mark Geisert wrote: > The existing code errors as EINVAL any attempt to set a value for > SO_PEERCRED via setsockopt() on an AF_UNIX/AF_LOCAL socket. But to > enable the workaround set_no_getpeereid behavior for Python one has > to be able to set SO_PEERCRED to zero.

Re: [PATCH 1/1] cygwin: use CREATE_DEFAULT_ERROR_MODE in spawn

2020-12-04 Thread Corinna Vinschen via Cygwin-patches
Hi Jeremy, On Dec 3 13:21, Jeremy Drake via Cygwin-patches wrote: > if a new CYGWIN/MSYS environment option `winjitdebug` is true, allowing > native subprocesses to get Windows-default error handling behavior (such > as invoking the registered JIT debugger). Cygwin processes will quickly > set

Re: [PATCH v2 0/2] proc(5) man page

2020-12-04 Thread Corinna Vinschen via Cygwin-patches
On Dec 1 09:49, Brian Inglis wrote: > On 2020-12-01 02:55, Corinna Vinschen wrote: > > On Nov 30 17:57, Brian Inglis wrote: > > > On 2020-11-30 03:47, Corinna Vinschen wrote: > > > > On Nov 24 23:49, Brian Inglis wrote: > > > > > Brian Inglis (2): > > > > > specialnames.xml: add proc(5)

Re: cygwin1.dll > 3.1.4: Program execution fails if (WSL-)symlink exists and is present in PATH

2020-12-03 Thread Corinna Vinschen via Cygwin
On Dec 3 10:58, Mattl Mario wrote: > Hello everyone, > > I can confirm: > with the latest snapshot-DLL, it is working fine again. (as Corinna mentioned) Thanks for testing! Corinna -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/

Re: cygwin1.dll > 3.1.4: Program execution fails if (WSL-)symlink exists and is present in PATH

2020-12-03 Thread Corinna Vinschen via Cygwin
On Dec 3 18:30, Takashi Yano via Cygwin wrote: > On Wed, 2 Dec 2020 16:35:02 +0100 > Corinna Vinschen via Cygwin wrote: > > On Dec 2 15:05, Corinna Vinschen wrote: > > > On Dec 2 13:39, Takashi Yano via Cygwin wrote: > > > > On Tue, 1 Dec 2020 19:13:39 -0500 &g

Re: [PATCH] Use automake (v3)

2020-12-02 Thread Corinna Vinschen via Cygwin-patches
On Dec 2 13:33, Yaakov Selkowitz via Cygwin-patches wrote: > On Wed, 2020-12-02 at 18:03 +, Jon Turney wrote: > > On 02/12/2020 17:05, Corinna Vinschen via Cygwin-patches wrote: > > > On Dec 2 15:36, Jon Turney wrote: > > > > On 01/12/2020 09:18, Corinna Vinsc

Re: [PATCH] Use automake (v3)

2020-12-02 Thread Corinna Vinschen via Cygwin-patches
On Dec 2 15:36, Jon Turney wrote: > On 01/12/2020 09:18, Corinna Vinschen wrote: > > > > What bugs me is that the mingw executables are built in utils/mingw, > > but the object files are still in utils. Any problem generating the > > object files in utils/mingw, too? > > Not easily. > > This

Re: [PATCH] Use automake (v3)

2020-12-02 Thread Corinna Vinschen via Cygwin-patches
On Dec 2 16:08, Jon Turney wrote: > On 01/12/2020 10:07, Corinna Vinschen wrote: > > > > I also don't like how test-driver is generated in the toplevel > > source dir. It should either be generated in source level winsup, > > I assume the placement of this file is controlled by

Re: cygwin1.dll > 3.1.4: Program execution fails if (WSL-)symlink exists and is present in PATH

2020-12-02 Thread Corinna Vinschen via Cygwin
On Dec 2 15:05, Corinna Vinschen wrote: > On Dec 2 13:39, Takashi Yano via Cygwin wrote: > > On Tue, 1 Dec 2020 19:13:39 -0500 > > Ken Brown via Cygwin wrote: > > > On 12/1/2020 4:24 AM, Mattl Mario wrote: > > > > Hello, > > > > > > > > Since cygwin1.dll version 3.1.5, I observed the following

<    3   4   5   6   7   8