From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2155) id AAE57386102D; Sun, 4 Dec 2022 13:28:17 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AAE57386102D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1670160497; bh=aV5DPG9xcZ4en4wlYDPCI/+WDW2frHSJpu5H+WnBsLk=; h=From:To:Subject:Date:From; b=f6AKnw+qmr2iFgnhcf4sKGX5pzwoMDOumEiX2Tqgc/f8eh+aHfZKtD4m/ik/+Axsq zDnziv2gue0SeluAAvPbdUigz6s1qKstBrbYpPu9oRDgfCTCb7W3SyywCsPBra8R7H zDYi2R2IkpoiBXgZSN6GRvSuAyPZkA4qQl7xMmW4= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Corinna Vinschen To: cygwin-cvs@sourceware.org Subject: [newlib-cygwin] Cygwin: flock: drop checking for artificial console handles X-Act-Checkin: newlib-cygwin X-Git-Author: Corinna Vinschen X-Git-Refname: refs/heads/master X-Git-Oldrev: a3af720dee13cb83f50406c4cddda635aca03e31 X-Git-Newrev: df680fb62df0bb0f30e7fda6ab0adc713937cb54 Message-Id: <20221204132817.AAE57386102D@sourceware.org> Date: Sun, 4 Dec 2022 13:28:17 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dnewlib-cygwin.git;h=3Ddf680fb62df= 0bb0f30e7fda6ab0adc713937cb54 commit df680fb62df0bb0f30e7fda6ab0adc713937cb54 Author: Corinna Vinschen AuthorDate: Tue Nov 15 21:51:14 2022 +0100 Commit: Corinna Vinschen CommitDate: Sun Dec 4 14:01:41 2022 +0100 Cygwin: flock: drop checking for artificial console handles =20 They have been used up to Windows 7 only. =20 Signed-off-by: Corinna Vinschen Diff: --- winsup/cygwin/flock.cc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/winsup/cygwin/flock.cc b/winsup/cygwin/flock.cc index 50db7fe28ed0..0f1efa01d45e 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 =3D F_POSIX; /* default */ =20 /* FIXME: For BSD flock(2) we need a valid, per file table entry OS hand= le. - 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) =3D=3D 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= "