[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [cobalt-developers] File Locking
- Subject: RE: [cobalt-developers] File Locking
- From: "Jose Luis Aguilar" <jlaguilar@xxxxxxx>
- Date: Mon Jun 19 20:39:08 2000
If I understand it well, you're not opening the lock file for writing, so it
is not being created... therefore you can't lock a file that doesn't exist.
Open the file for writing like this:
open(LOCK, ">../db/vacs.lck");
-----Original Message-----
From: cobalt-developers-admin@xxxxxxxxxxxxxxx
[mailto:cobalt-developers-admin@xxxxxxxxxxxxxxx]On Behalf Of
mail@xxxxxxxxxxxx
Sent: Monday, June 19, 2000 3:28 PM
To: cobalt-developers@xxxxxxxxxxxxxxx
Subject: [cobalt-developers] File Locking
I am using the routine below as part of a perl script to create a file lock
on a RQ2 however it gives a server error. I have used the same routine
before extensively on Linux with Apache without any problems. If anyone has
any ideas much appreciated.
open(LOCK, "../db/vacs.lck");
unless (flock(LOCK, 2)) {
die "Unable to lock file for write!\n";
}
dbmopen(%db, "../db/vacs", 0666);
&subroutines;
dbmclose(%db);
flock(LOCK, 8);
close(LOCK);
I
*******
Regards
Peter Stubbs
AgencyCo.com Ltd
Email: mail@xxxxxxxxxxxx
Tel:020 7503 8260
Fax: 0870 056 9199
_______________________________________________
cobalt-developers mailing list
cobalt-developers@xxxxxxxxxxxxxxx
http://list.cobalt.com/mailman/listinfo/cobalt-developers