projects
/
cloudstore.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1c50c5f
)
kill rsync with INT if allready running
author
Dobrica Pavlinusic
<dpavlin@rot13.org>
Fri, 22 Jul 2011 13:15:02 +0000
(13:15 +0000)
committer
Dobrica Pavlinusic
<dpavlin@rot13.org>
Fri, 22 Jul 2011 13:15:02 +0000
(13:15 +0000)
rsync-piper.pl
patch
|
blob
|
history
diff --git
a/rsync-piper.pl
b/rsync-piper.pl
index
fa9a4fb
..
bbb51e5
100755
(executable)
--- a/
rsync-piper.pl
+++ b/
rsync-piper.pl
@@
-120,6
+120,11
@@
if ( -e $pid_file ) {
chomp($pid);
if ( kill 0, $pid ) {
warn "found rsync pid $pid";
+ kill 2, $pid;
+ while ( -e $pid_file ) {
+ warn "waiting for rsync to die...";
+ sleep 1;
+ }
} else {
unlink $pid_file;
}