diff options
author | 2015-04-21 10:24:22 +0000 | |
---|---|---|
committer | 2015-04-21 10:24:22 +0000 | |
commit | f3fe92c90f987a8ad7d71dfb52646b676ea4db88 (patch) | |
tree | 8d48a9f04ee00509d67b6af30648f703cc4dabdd | |
parent | Revert previous. Packets going through carp_input() but not destinated (diff) | |
download | wireguard-openbsd-f3fe92c90f987a8ad7d71dfb52646b676ea4db88.tar.xz wireguard-openbsd-f3fe92c90f987a8ad7d71dfb52646b676ea4db88.zip |
When diff(1) finds differences, it returns an exit status of 1.
In that particular case, refrain from printing "diff: exit code 1"
because that exit status doesn't indicate an error condition.
Issue noticed by and patch OK'ed by ajacoutot@.
"I agree with the goal, and I suspect the diff actually achieves it" guenther@.
-rw-r--r-- | libexec/security/security | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/libexec/security/security b/libexec/security/security index ef11c0c85e3..65ec816e985 100644 --- a/libexec/security/security +++ b/libexec/security/security @@ -1,6 +1,6 @@ #!/usr/bin/perl -T -# $OpenBSD: security,v 1.34 2015/03/27 13:26:19 schwarze Exp $ +# $OpenBSD: security,v 1.35 2015/04/21 10:24:22 schwarze Exp $ # # Copyright (c) 2011, 2012, 2014, 2015 Ingo Schwarze <schwarze@openbsd.org> # Copyright (c) 2011 Andrew Fresh <andrew@afresh1.com> @@ -738,7 +738,11 @@ sub diff { and return; local $/; my $diff = <$fh>; - close_or_nag $fh, "diff"; + { + close $fh and last; + nag $!, "diff: error closing pipe: $!" and last; + nag $? >> 8 > 1, "diff: exit code " . ($? >> 8); + } return nag !!$diff, $diff; } |