The commit implementing OFD locks dropped the F_GETLK case from the
switch in fhandler_base::lock, replacing it with F_OFD_GETLK. This
appears to have been an oversight, as F_OFD_SETLK was added as an
additional case above.
This resulted in the winsup.api/ltp/fcntl05 test failing.
Fixes: a66ed519884d ("Cygwin: fcntl: implement Open File Description (OFD)
locks")
Signed-off-by: Jeremy Drake <[email protected]>
---
After this fix, the stc tests can run in CI and I'm also seeing many_locks
test fail with EDEADLK.
winsup/cygwin/flock.cc | 1 +
1 file changed, 1 insertion(+)
diff --git a/winsup/cygwin/flock.cc b/winsup/cygwin/flock.cc
index 85800e9714..e9f49a8900 100644
--- a/winsup/cygwin/flock.cc
+++ b/winsup/cygwin/flock.cc
@@ -1162,6 +1162,7 @@ restart: /* Entry point after a restartable signal came
in. */
clean = lock;
break;
+ case F_GETLK:
case F_OFD_GETLK:
error = lf_getlock (lock, node, fl);
lock->lf_next = clean;
--
2.50.1.windows.1