]> skyeroc.xyz Git - dgamelaunch/commitdiff
Maybe this'll do it.
authorJoshua Kwan <joshk@triplehelix.org>
Fri, 13 Feb 2004 23:15:03 +0000 (23:15 +0000)
committerJoshua Kwan <joshk@triplehelix.org>
Fri, 13 Feb 2004 23:15:03 +0000 (23:15 +0000)
git-svn-id: svn://katsu.triplehelix.org/dgamelaunch/trunk@234 db0b04b0-f4d1-0310-9a6d-de3e77497b0e

Changelog
dgamelaunch.c
ttyrec.c

index cedabc7e25ecea72a5b48b9c86d689b24b5b1863..55809ebec525c4c2f1c2b78fd90d73aeae9bad26 100644 (file)
--- a/Changelog
+++ b/Changelog
@@ -1,5 +1,8 @@
 1.4.1 (2004/02/13)
-       * Call fcntl with F_SETLK, not F_UNLCK.
+       * Don't explicitly unlock the lock file before fclosing it;
+         this creates a race condition where we might not have finished
+         writing to /dgl-login before we tell people that they can write
+         to it again.
        * Make sure writefile does not get called when using it as a
          password prompt for new-users
        * Allow user to change his or her email address in the console.
index 466a6e649e32ee6c88c562f6b97877ffe5c00872..61021756e9c0ebd5e1ffc498c86b795389d75155 100644 (file)
@@ -459,13 +459,9 @@ populate_games (int *l)
           /* clean dead ones */
           unlink (fullname);
         }
-      fl.l_type = F_UNLCK;
-
-      fcntl (fd, F_SETLK, &fl);
+      close (fd);
 
       fl.l_type = F_WRLCK;
-      
-      close (fd);
     }
 
   closedir (pdir);
@@ -1167,11 +1163,7 @@ readfile (int nolock)
     }
 
   if (!nolock)
-    {
-      fl.l_type = F_UNLCK;
-      fcntl (fileno(fpl), F_SETLK, &fl);
       fclose (fpl);
-    }
   fclose (fp);
   return 0;
 }
index 1777d7ebfc373bb453f1817c052732e065b60e1b..b212358576f708b1bf5d9888986a45595a2dc1ba 100644 (file)
--- a/ttyrec.c
+++ b/ttyrec.c
@@ -61,7 +61,6 @@
 # include <stropts.h>
 #endif
 #include <stdlib.h>
-#include <fcntl.h>
 
 #include "ttyrec.h"
 #include "io.h"