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 requirement in
https://man7.org/linux/man-pages/man3/ptsname_r.3.html that an error
number should be returned on failure. (That man
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.cc
index ab0c4c2d6..b5ab6ac5e 100644
--- a/wins
path_conv already knows the IndexNumber, so just use it.
This commit also fixes the potential handle leak.
---
winsup/cygwin/fhandler_disk_file.cc | 24 ++--
1 file changed, 6 insertions(+), 18 deletions(-)
diff --git a/winsup/cygwin/fhandler_disk_file.cc
b/winsup/cygwin/fha
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
+++ b/winsup/cygwin/dir.cc
@@ -22,6 +22,8 @@ details.
When file attributes are of no concern, there is no point to query them.
This can greatly speedup code which doesn't need it.
The idea is to have a shallow path conversion with only minimal information.
The upcoming unlink_nt for example, first tries a path without filesystem
checks, then - if ne
Implement _unlink_nt: wich does not depend on patch_conv
---
winsup/cygwin/fhandler_disk_file.cc | 4 +-
winsup/cygwin/forkable.cc | 4 +-
winsup/cygwin/syscalls.cc | 211 ++--
3 files changed, 200 insertions(+), 19 deletions(-)
diff --git a/winsup/
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
winsup/cygwin/syscalls.cc
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 2e50ad7d5..54b065733 100644
-
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.cc | 14 +-
winsup/cygwin/wincap.cc | 11 +++
Hi,
I think I got all remarks, please let me know if I missed something.
I'm still thinking on a better way to use fs_info::update cache,
but it requires more testing.
Thank you,
Ben Wijen (8):
syscalls.cc: unlink_nt: Try FILE_DISPOSITION_IGNORE_READONLY_ATTRIBUTE
syscalls.cc: Deduplicate
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/msg00214.html
---
winsup/cygwin/path.cc | 4 +++-
winsup/cygw
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
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_ENOUGH_MEMORY occurs in Win7.
>
> Huh, funny! Will we ever be hap
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
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
- 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_console.cc | 10 ++--
winsup/cygwin/select.cc | 95 ++
16 matches
Mail list logo