+ return $exists && $origSize > 0;
+}
+
+#
+# Generate a log file message for a completed file
+#
+sub logFileAction
+{
+ my($action, $f) = @_;
+ my $owner = "$f->{uid}/$f->{gid}";
+ my $name = $f->{name};
+ $name = "." if ( $name eq "" );
+ my $type = (("", "p", "c", "", "d", "", "b", "", "", "", "l", "", "s"))
+ [($f->{mode} & S_IFMT) >> 12];
+ $type = "h" if ( $f->{type} == BPC_FTYPE_HARDLINK );
+
+ printf(" %-6s %1s%4o %9s %11.0f %s\n",
+ $action,
+ $type,
+ $f->{mode} & 07777,
+ $owner,
+ $f->{size},
+ $name);
+}
+
+sub catch_signal
+{
+ my $sigName = shift;
+
+ #
+ # The first time we receive a signal we try to gracefully
+ # abort the backup. This allows us to keep a partial dump
+ # with the in-progress file deleted and attribute caches
+ # flushed to disk etc.
+ #
+ print("BackupPC_tarExtract: got signal $sigName\n");
+ if ( !$Abort ) {
+ $Abort++;
+ $AbortReason = "received signal $sigName";
+ return;
+ }
+
+ #
+ # This is a second signal: time to clean up.
+ #
+ print("BackupPC_tarExtract: quitting on second signal $sigName\n");
+ close(NEW_FILES);
+ exit(1)