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 AC_CONFIG_AUX_DI

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 b

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

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 t

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

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

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 > +++ b/winsup/cygwin/net.

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

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 p

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_no_ge

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

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 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 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 a/winsup/cygwin/s

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

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

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 enclaves

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 or

Re: [PATCH] Cygwin: fstatat: call fstat64 instead of fstat

2021-01-13 Thread Corinna Vinschen via Cygwin-patches
Hi Ken, Happy New Year, btw :) On Jan 12 14:45, Ken Brown via Cygwin-patches wrote: > This fixes a bug on 32-bit Cygwin that was introduced in commit > 84252946, "Cygwin: fstatat, fchownat: support the AT_EMPTY_PATH flag". > > Add a comment explaining why fstat should not be called. > > Address

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 (); > + st

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 b/winsup/cygwin/rel

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 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 a/winsup/cygwin/ntdll.

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 deletions(-)

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 0e89b4f44..227

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 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 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 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 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(+), 2

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 > +++ b/winsup/cygwin/dir.c

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

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

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 tmp_pathbuf

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 _

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 chang

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

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

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] 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 > +++ b/winsup/cygwin/

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 a/winsup/cy

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 buffe

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. > --- > winsup/cygwin/fhandler_c

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 ERROR_NOT_E

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 the

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: https://lists.gnu.org/archive/html/bug-gnulib/2021-01/msg00

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 v2 1/8] syscalls.cc: unlink_nt: Try FILE_DISPOSITION_IGNORE_READONLY_ATTRIBUTE

2021-01-22 Thread Corinna Vinschen via Cygwin-patches
Hi Ben, On Jan 20 17:10, Ben Wijen wrote: > Implement wincap.has_posix_unlink_semantics_with_ignore_readonly and when set > skip setting/clearing of READONLY attribute and instead use > FILE_DISPOSITION_IGNORE_READONLY_ATTRIBUTE > --- > winsup/cygwin/ntdll.h | 3 ++- > winsup/cygwin/syscalls

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 some

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 b/winsup/cygwin

Re: [PATCH v2 3/8] Cygwin: Move post-dir unlink check

2021-01-22 Thread Corinna Vinschen via Cygwin-patches
On Jan 20 17:10, Ben Wijen wrote: > Move post-dir unlink check from fhandler_disk_file::rmdir to > _unlink_nt_post_dir_check > > If a directory is not removed through fhandler_disk_file::rmdir > we can now make sure the post dir check is performed. > --- > winsup/cygwin/fhandler_disk_file.cc | 20

Re: [PATCH v3 1/8] syscalls.cc: unlink_nt: Try FILE_DISPOSITION_IGNORE_READONLY_ATTRIBUTE

2021-01-25 Thread Corinna Vinschen via Cygwin-patches
Hi Ben, On Jan 22 16:47, Ben Wijen wrote: > I think we don't need an extra flag as we can utilize: access & > FILE_WRITE_ATTRIBUTES > What do you think? Good idea. Pushed. Corinna

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

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 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 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 b/winsup/cygwin/syscalls.c

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 8/8] fhandler_disk_file.cc: Use path_conv's IndexNumber

2021-01-26 Thread Corinna Vinschen via Cygwin-patches
On Jan 20 17:10, Ben Wijen wrote: > path_conv already knows the IndexNumber, so just use it. Yeah, this looks like a vestige from before the time we switched to FILE_ALL_INFORMATION. > > This commit also fixes the potential handle leak. > --- > winsup/cygwin/fhandler_disk_file.cc | 24 ++---

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

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

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 P

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 p

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: [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 the

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

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

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-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: [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 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, b

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. > > winsup/cygwin/f

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

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

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 look

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

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 pa

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 nat

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 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: [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, say,

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 0/1] Fix fstat on FIFOs, part 1

2021-02-09 Thread Corinna Vinschen via Cygwin-patches
On Feb 9 10:11, Ken Brown via Cygwin-patches wrote: > Commit 76dca77f04 had a careless blunder, so this patch reverts it. > > Nevertheless, fstat(2) can be made more efficient on FIFOs, and I'm > working on a separate patchset to do this right. It's worth doing, > because every call to open(2) o

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

2021-02-10 Thread Corinna Vinschen via Cygwin-patches
On Feb 10 01:07, Mark Geisert wrote: > Hi Corinna, > > Corinna Vinschen via Cygwin-patches wrote: > > Hi Mark, > > > > On Feb 9 02:50, Mark Geisert wrote: > > > Per discussion on cygwin-developers, a Cygwin tmpfile(3) implementation > > > has been

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

2021-02-12 Thread Corinna Vinschen via Cygwin-patches
On Feb 10 22:53, 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. > > This v2 pat

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

2021-02-12 Thread Corinna Vinschen via Cygwin-patches
On Feb 11 18:09, Takashi Yano via Cygwin-patches wrote: > - Currently, input transfer is performed every time one line is read(), > if the non-cygwin app is running in the background. With this patch, > transfer is triggered by setpgid() rather than read() so that the > unnecessary input tran

Re: [PATCH] winsup/doc/posix.xml: add note for getrlimit, setrlimit, links to notes

2021-02-15 Thread Corinna Vinschen via Cygwin-patches
Hi Brian, On Feb 12 18:06, Brian Inglis wrote: > > change notes to see "Implementation Notes" to links to std-notes.html; > links work in html docs but appear as text in info docs; > add link to std-notes.html to getrlimit, setrlimit; > add note to document limitations of getrlimit, setrlimit res

Re: [PATCH v2] Cygwin: console: Abort read() on signal if SA_RESTART is not set.

2021-02-15 Thread Corinna Vinschen via Cygwin-patches
Hi Takashi, On Feb 14 18:42, Takashi Yano via Cygwin-patches wrote: > - Currently, console read() keeps reading after SIGWINCH is sent > even if SA_RESTART flag is not set. With this patch, read() > returns EINTR on SIGWINCH if SA_RESTART flag is not set. > The same problem for SIGQUIT and S

Re: [PATCH] Cygwin: pty: Fix a bug in input transfer for GDB.

2021-02-15 Thread Corinna Vinschen via Cygwin-patches
On Feb 15 03:47, Takashi Yano via Cygwin-patches wrote: > - With this patch, not only NL but also CR is treated as a line end > in the code checking if input transfer is necessary. > --- > winsup/cygwin/fhandler_tty.cc | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git

Re: [PATCH v2] Cygwin: console: Abort read() on signal if SA_RESTART is not set.

2021-02-15 Thread Corinna Vinschen via Cygwin-patches
On Feb 15 22:08, Takashi Yano via Cygwin-patches wrote: > On Mon, 15 Feb 2021 13:04:41 +0100 > Corinna Vinschen wrote: > > On Feb 14 18:42, Takashi Yano via Cygwin-patches wrote: > > > - Currently, console read() keeps reading after SIGWINCH is sent > > > even if SA_RESTART flag is not set. With

Re: [PATCH v2] winsup/doc/posix.xml: add note for getrlimit, setrlimit, xrefs to notes

2021-02-16 Thread Corinna Vinschen via Cygwin-patches
Hi Brian, On Feb 15 15:35, Brian Inglis wrote: > > change notes to see "Implementation Notes" to xref to std-notes; > add xref to std-notes to getrlimit, setrlimit; > add note to document limitations of getrlimit, setrlimit resources support > --- > winsup/doc/posix.xml | 101 +++

  1   2   >