Maybe this'll do it.
git-svn-id: svn://katsu.triplehelix.org/dgamelaunch/trunk@234 db0b04b0-f4d1-0310-9a6d-de3e77497b0e
This commit is contained in:
parent
1dd5b1dc8b
commit
6e01003303
|
@ -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.
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue