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 Takashi Yano via Cygwin-patches
On Fri, 22 Jan 2021 10:50:28 +0100 Corinna Vinschen wrote: > 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 pre

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

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

2021-01-22 Thread Ben Wijen
I think we don't need an extra flag as we can utilize: access & FILE_WRITE_ATTRIBUTES What do you think? Ben Wijen (1): syscalls.cc: unlink_nt: Try FILE_DISPOSITION_IGNORE_READONLY_ATTRIBUTE winsup/cygwin/ntdll.h | 3 ++- winsup/cygwin/syscalls.cc | 22 +++ winsup/cygwin/win

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

2021-01-22 Thread Ben Wijen
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/syscalls.cc index 8651cfade..e6ff0fd7a 100644 -