Fixed false error code on diff(1) returning its exit code 1.
authorshort <>
Tue, 26 Apr 2005 06:28:12 +0000 (06:28 +0000)
committershort <>
Tue, 26 Apr 2005 06:28:12 +0000 (06:28 +0000)
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=$?): $!";
+       }