]> skyeroc.xyz Git - dgamelaunch/commitdiff
always pass F_SETLK to fcntl even when unlocking
authorJoshua Kwan <joshk@triplehelix.org>
Sun, 4 Jan 2004 01:00:18 +0000 (01:00 +0000)
committerJoshua Kwan <joshk@triplehelix.org>
Sun, 4 Jan 2004 01:00:18 +0000 (01:00 +0000)
git-svn-id: svn://katsu.triplehelix.org/dgamelaunch/trunk@60 db0b04b0-f4d1-0310-9a6d-de3e77497b0e

dgamelaunch.c

index 749611a2da75e7584cc21d6aab959b620f5332d6..10b6379956a99cfb04a3236af9a5f05d74a52882 100644 (file)
@@ -335,7 +335,7 @@ populate_games (int *l)
         }
       fl.l_type = F_UNLCK;
 
-      fcntl (fd, F_UNLCK, &fl);
+      fcntl (fd, F_SETLK, &fl);
       close (fd);
     }
 
@@ -572,7 +572,7 @@ domailuser (char *username)
 
   fl.l_type = F_UNLCK;
 
-  if (fcntl (fileno (user_spool), F_UNLCK, &fl) == -1)
+  if (fcntl (fileno (user_spool), F_SETLK, &fl) == -1)
     mvaddstr (10, 1, "Couldn't unlock the file! Oh well.");
 
   fclose (user_spool);