+#
+# The Xfer method might tell us from time to time about processes
+# it forks. We tell BackupPC about this (for status displays) and
+# keep track of the pids in case we cancel the backup
+#
+sub pidHandler
+{
+ @xferPid = @_;
+ @xferPid = grep(/./, @xferPid);
+ return if ( !@xferPid && $tarPid < 0 );
+ my @pids = @xferPid;
+ push(@pids, $tarPid) if ( $tarPid > 0 );
+ my $str = join(",", @pids);
+ $XferLOG->write(\"Xfer PIDs are now $str\n") if ( defined($XferLOG) );
+ print("xferPids $str\n");
+}
+