This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: [patch] lockf() fix


...and here's one for 2.1.3...

-- 
 -----------=======-=-======-=========-----------=====------------=-=------
/  Ben Collins  --  ...on that fantastic voyage...  --  Debian GNU/Linux   \
`  bcollins@debian.org  --  bcollins@openldap.org  --  bcollins@linux.com  '
 `---=========------=======-------------=-=-----=-===-======-------=--=---'
--- io/lockf.c~	Sun Oct 29 08:25:09 2000
+++ io/lockf.c	Sun Oct 29 08:25:26 2000
@@ -39,6 +39,7 @@
   switch (cmd)
     {
     case F_TEST:
+      fl.l_type = F_RDLCK;
       /* 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.  */
       if (__fcntl (fd, F_GETLK, &fl) < 0)
--- sysdeps/generic/lockf64.c~	Sun Oct 29 08:26:43 2000
+++ sysdeps/generic/lockf64.c	Sun Oct 29 08:26:56 2000
@@ -44,6 +44,7 @@
   switch (cmd)
     {
     case F_TEST:
+      fl.l_type = F_RDLCK;
       /* 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.  */
       if (__fcntl (fd, F_GETLK, &fl) < 0)

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]