projects
/
cloudstore.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
66e3cfd
)
die if process can't be killed
author
Dobrica Pavlinusic
<dpavlin@rot13.org>
Tue, 23 Aug 2011 23:31:05 +0000
(23:31 +0000)
committer
Dobrica Pavlinusic
<dpavlin@rot13.org>
Tue, 23 Aug 2011 23:31:05 +0000
(23:31 +0000)
rsync-piper.pl
patch
|
blob
|
history
diff --git
a/rsync-piper.pl
b/rsync-piper.pl
index
12574eb
..
5751e96
100755
(executable)
--- a/
rsync-piper.pl
+++ b/
rsync-piper.pl
@@
-120,12
+120,13
@@
if ( -e $pid_file ) {
my $pid = read_file $pid_file;
chomp($pid);
if ( kill 0, $pid ) {
- warn "found rsync pid $pid";
+ warn "found rsync pid $pid
\n
";
kill 2, $pid;
while ( -e $pid_file ) {
- warn "waiting for rsync to die...";
+ warn "waiting for rsync to die...
\n
";
sleep 1;
}
+ kill 0, $pid && die "can't kill it!";
} else {
unlink $pid_file;
}