Beco <r...@beco.cc> writes: > After implementing the score (using SGID), I have a race condition in my > game.
> The comparisson is between the just scored point with the last point > in the top-10. > readscore_file2memory(); > If(pt>top[9]) > { > printf("Congrats... and stuff\n"); > reorderscore_memory(); > savescore_memory2file(); > } > What would be the standard way to lock the scorefile? fcntl(fd, F_SETLK). See fcntl(2). -- Russ Allbery (r...@debian.org) <http://www.eyrie.org/~eagle/> -- To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/87ob73faol....@windlord.stanford.edu