From: aidan@skinner.demon.co.uk (Aidan Skinner)
Subject: Re: Locked highscore file
Date: 1999/08/09
Date: 1999-08-09T00:00:00+00:00 [thread overview]
Message-ID: <slrn7qs9q9.ui.aidan@skinner.demon.co.uk> (raw)
In-Reply-To: vhin1w2fa16.fsf@grotte.ifi.uio.no
On 08 Aug 1999 19:37:57 +0200, Jan Kroken <jankr@nntp.ifi.uio.no> wrote:
>Lock the file
Aquire a Write_Lock on the file using Posix.File_Locking.Set_Lock or
Wait_To_Set_Lock.
>Read the entries and merge them with my local score table
>Write the new table to the file
Open the file, read it. Write it, you have you the only acces to the file.
>unlock the file
use Posix.File_Locking.Set_Lock with Lock.Lock = Unlock.
This should be possible with any system that has a posix
implementation available.
- Aidan
--
Gimme money, gimme sex, gimme UNIX and root access.
http://www.skinner.demon.co.uk/aidan/
parent reply other threads:[~1999-08-09 0:00 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <vhin1w2fa16.fsf@grotte.ifi.uio.no>]
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox