changed lockfile name to .lck (from .lock) for M$

This commit is contained in:
minima 2001-04-08 23:21:28 +00:00
parent fe40d951b9
commit 5e7031a532
5 changed files with 14 additions and 4 deletions

View File

@ -1,3 +1,5 @@
09Apr01=======================================================================
1. changed lockfile name to cluster.lck (from .lock) for MSWin's benefit
08Apr01=======================================================================
1. added a quick installation guide to the admin manual and removed references
to client.pl (g0vgs)

View File

@ -340,7 +340,7 @@ BEGIN {
# try to detect a lockfile (this isn't atomic but
# should do for now
$lockfn = "$root/perl/cluster.lock"; # lock file name
$lockfn = "$root/perl/cluster.lck"; # lock file name
if (-e $lockfn) {
open(CLLOCK, "$lockfn") or die "Can't open Lockfile ($lockfn) $!";
my $pid = <CLLOCK>;

View File

@ -25,7 +25,7 @@ BEGIN {
# try to create and lock a lockfile (this isn't atomic but
# should do for now
my $lockfn = "$root/perl/cluster.lock"; # lock file name
$lockfn = "$root/perl/cluster.lck"; # lock file name
if (-e $lockfn) {
open(CLLOCK, "$lockfn") or die "Can't open Lockfile ($lockfn) $!";
my $pid = <CLLOCK>;
@ -89,7 +89,6 @@ use vars qw(@inqueue $systime $version $starttime $lockfn @outstanding_connects
$systime = 0; # the time now (in seconds)
$version = "1.47"; # the version no of the software
$starttime = 0; # the starting time of the cluster
$lockfn = "cluster.lock"; # lock file name
#@outstanding_connects = (); # list of outstanding connects
@listeners = (); # list of listeners

View File

@ -75,6 +75,15 @@ sub create_it
}
$lockfn = "$root/perl/cluster.lck"; # lock file name
if (-e $lockfn) {
open(CLLOCK, "$lockfn") or die "Can't open Lockfile ($lockfn) $!";
my $pid = <CLLOCK>;
chomp $pid;
die "Sorry, Lockfile ($lockfn) and process $pid exist, a cluster is running\n" if kill 0, $pid;
close CLLOCK;
}
if (-e "$userfn") {
print "Do you wish to destroy your user database (THINK!!!) [y/N]: ";
$ans = <STDIN>;

View File

@ -82,7 +82,7 @@ sub create_it
}
$lockfn = "$root/perl/cluster.lock"; # lock file name
$lockfn = "$root/perl/cluster.lck"; # lock file name
if (-e $lockfn) {
open(CLLOCK, "$lockfn") or die "Can't open Lockfile ($lockfn) $!";
my $pid = <CLLOCK>;