Fixed false error code on diff(1) returning its exit code 1.
[nethome.git] / bin / kernel / diffkernel
index c1fa61b..bc35b99 100755 (executable)
@@ -24,4 +24,7 @@ while (<DIFF>) {
        next if /^Only in /;
        print;
        }
-close DIFF or die "Cannot close the 'diff' output: $!";
+# It is valid for diff(1) to return its exit code 1.
+if (close DIFF && $?!=256) {
+       die "Cannot close the 'diff' output (status=$?): $!";
+       }