[fpc-pascal]Total locking...

Ziegenhorn Tourism Database info at ziegenhorn.de
Tue Nov 28 10:08:40 CET 2000


At Tue, 28 Nov 2000, fpc-pascal at deadlock.et.tudelft.nl wrote:
>Hi, everybody!
>
>Another question to the same programming needs:
>
>I need to do an absolute 100% blocking LOCKING.
>
>I want to create a file and put such strong locks on it, that no other
>program can overcome this lock.
>All related other programs test for presence of this file. If existing,
>they must be blocked until it is away.
>
>Currently I simply create a text-file, add FLock(File,LOCK_EX); and keep
>it open.
>Is this enough?
>
>Is it possible that another instance of the same program can take over
>this file in some situations? Or will it always get an IOResult Error?
>
A rm will delete the file anyway. That means, if you have all
programs under controll which access this file, and all of them
use (File,LOCK_EX) it will do the job.

*************************************
Ziegenhorn Tourism Database
P.O. Box 16 45
76726 Germersheim, Germany
Tel: +49-7274-2759 Fax: +49-7274-3631
http://www.ziegenhorn.com
*************************************





More information about the fpc-pascal mailing list