Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the listing of all rsync PIDs on the system. Fixes #24 #25

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion parsyncfp
Original file line number Diff line number Diff line change
Expand Up @@ -665,7 +665,8 @@ sub get_rPIDs($$) {
# how many rsyncs are running? Check the PIDFILE against the rsync PIDs that are running
# if there are other rsyncs running, their PIDs won't be in the PIDFILE.
# so have to do a diff of the PIDFILE vs all PIDs of rsyncs running.
my $ALL_SYS_RSYNC_PIDS = `ps aux | grep rsyn[c] | awk '{print $2}' | sort -g | tr '\n' ' '`; chop $ALL_SYS_RSYNC_PIDS;
my $ALL_SYS_RSYNC_PIDS = `ps aux | grep rsyn[c] | awk '{print \$2}' | sort -g | tr '\n' ' '`; chop $ALL_SYS_RSYNC_PIDS;
if ($DEBUG){print "\tDEBUG: PIDs of all rsync procs on the system: " . $ALL_SYS_RSYNC_PIDS . " \n"}
$NASRP = @ASRP = split(/\s+/, $ALL_SYS_RSYNC_PIDS);
open (PIDFILE, "<$pidfile") or FATAL("Can't open PIDFILE [$pidfile]'");
# PIDs from the PIDFILE to compare system rsyncs (could be multiple going)
Expand Down