+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)
# 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>;
# 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>;
$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
}
+$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>;
}
-$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>;