--- FSCounter/FSCounter.py.orig 2004-10-30 20:53:52.000000000 +0900 +++ FSCounter/FSCounter.py 2004-10-30 21:03:31.000000000 +0900 @@ -42,6 +42,7 @@ import string import Globals # so I can get Globals data_dir import time +import fcntl from numbers import num2eng @@ -166,7 +167,10 @@ value = int(newvalue) #try: outfile = open(str(Globals.data_dir) + os.sep + str(self.filename), 'wb') + fcntl.flock(outfile.fileno(), fcntl.LOCK_EX) outfile.write(str(value)) + outfile.flush() + fcntl.flock(outfile.fileno(), fcntl.LOCK_UN) outfile.close() #except: # pass