diff options
author | Andreas Jaeger <aj@suse.de> | 2000-10-30 06:47:34 +0000 |
---|---|---|
committer | Andreas Jaeger <aj@suse.de> | 2000-10-30 06:47:34 +0000 |
commit | 35b99c57f4d50bcfb91126ab2e7520ea29aae6f0 (patch) | |
tree | d688bb311d7efb7bfafc8d20e378a536a4fca0b8 /sysdeps/generic/lockf64.c | |
parent | c6042c732e6d20fbecd227c03ef1efde17dc7d2c (diff) | |
download | glibc-35b99c57f4d50bcfb91126ab2e7520ea29aae6f0.tar.gz glibc-35b99c57f4d50bcfb91126ab2e7520ea29aae6f0.tar.xz glibc-35b99c57f4d50bcfb91126ab2e7520ea29aae6f0.zip |
In the case of F_TEST, set l_type to F_RDLCK explicitly.
Diffstat (limited to 'sysdeps/generic/lockf64.c')
-rw-r--r-- | sysdeps/generic/lockf64.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sysdeps/generic/lockf64.c b/sysdeps/generic/lockf64.c index 3d27964879..0caae6ae44 100644 --- a/sysdeps/generic/lockf64.c +++ b/sysdeps/generic/lockf64.c @@ -49,6 +49,7 @@ lockf64 (int fd, int cmd, off64_t len64) case F_TEST: /* Test the lock: return 0 if FD is unlocked or locked by this process; return -1, set errno to EACCES, if another process holds the lock. */ + fl.l_type = F_RDLCK; if (__fcntl (fd, F_GETLK, &fl) < 0) return -1; if (fl.l_type == F_UNLCK || fl.l_pid == __getpid ()) |