From 9a63916db821a50afda2a12eb835cc1bf7e53083 Mon Sep 17 00:00:00 2001 From: "Andreas J. Koenig" Date: Thu, 17 Feb 2011 21:09:39 +0100 Subject: [PATCH] more defensive against broken procfile --- lib/File/Rsync/Mirror/Recentfile.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/File/Rsync/Mirror/Recentfile.pm b/lib/File/Rsync/Mirror/Recentfile.pm index 9fb6ef7..60fa288 100644 --- a/lib/File/Rsync/Mirror/Recentfile.pm +++ b/lib/File/Rsync/Mirror/Recentfile.pm @@ -829,6 +829,8 @@ sub lock { if (open my $fh, "<", $procfile) { chomp(my $process = <$fh>); if (0) { + } elsif ($process !~ /^\d+$/) { + warn "Warning: unknown process holds a lock in '$lockdir', waiting..." unless $have_warned{unknown}++; } elsif ($$ == $process) { last GETLOCK; } elsif (kill 0, $process) { -- 2.11.4.GIT