mirror of
git://scm.dxcluster.org/scm/spider
synced 2024-09-21 07:47:10 +00:00
changed lockfile name to .lck (from .lock) for M$
This commit is contained in:
parent
fe40d951b9
commit
5e7031a532
2
Changes
2
Changes
@ -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)
|
||||
|
@ -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>;
|
||||
|
@ -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
|
||||
|
||||
|
@ -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>;
|
||||
|
@ -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>;
|
||||
|
Loading…
Reference in New Issue
Block a user