Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2022-11-15 23:51:14 +0300
committerCorinna Vinschen <corinna@vinschen.de>2022-11-25 15:35:57 +0300
commit369c467926ebbd18d209df76312593af65de0b4b (patch)
tree23b8bfa1fe7ff3e91e539949d5886fb2cdb8a60b
parent1d7c2fffd466b18598a4a76b5f17bb48a0de9cc8 (diff)
Cygwin: flock: drop checking for artificial console handles
They have been used up to Windows 7 only. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
-rw-r--r--winsup/cygwin/flock.cc6
1 files changed, 2 insertions, 4 deletions
diff --git a/winsup/cygwin/flock.cc b/winsup/cygwin/flock.cc
index 50db7fe28..0f1efa01d 100644
--- a/winsup/cygwin/flock.cc
+++ b/winsup/cygwin/flock.cc
@@ -951,10 +951,8 @@ fhandler_base::lock (int a_op, struct flock *fl)
a_flags = F_POSIX; /* default */
/* FIXME: For BSD flock(2) we need a valid, per file table entry OS handle.
- Therefore we can't allow using flock(2) on nohandle devices and
- pre-Windows 8 console handles (recognized by their odd handle value). */
- if ((a_flags & F_FLOCK)
- && (nohandle () || (((uintptr_t) get_handle () & 0x3) == 0x3)))
+ Therefore we can't allow using flock(2) on nohandle devices. */
+ if ((a_flags & F_FLOCK) && nohandle ())
{
set_errno (EINVAL);
debug_printf ("BSD locking on nohandle and old-style console devices "