fix various issues
[spider.git] / perl / cluster.pl
index 86785a9777c45c8ae0a4284ec1a0b86c9b84d3da..d82dd2e73bbd8d67aa68538a39dd19e49f6ae00e 100755 (executable)
@@ -43,7 +43,10 @@ BEGIN {
                my $pid = <CLLOCK>;
                if ($pid) {
                        chomp $pid;
-                       die "Lockfile ($lockfn) and process $pid exist, another cluster running?" if kill 0, $pid;
+                       if (kill 0, $pid) {
+                               warn "Lockfile ($lockfn) and process $pid exist, another cluster running?\n";
+                               exit 1;
+                       }
                }
                unlink $lockfn;
                close CLLOCK;
@@ -56,6 +59,7 @@ BEGIN {
        $systime = time;
 }
 
+                       
 use Mojo::IOLoop;
 
 use DXVars;