From: Jim Meyering Date: Fri, 17 Dec 2004 08:12:52 +0000 (+0000) Subject: Use `(exit N); exit N', not `(exit N); exit'. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2ab798f8263f3dd4d22356b995224325217f730e;p=pspp Use `(exit N); exit N', not `(exit N); exit'. Otherwise, install-sh could exit with improper exit status when exiting via a trapped interrupt. Thanks to a report from Bob Proulx. --- diff --git a/config/install-sh b/config/install-sh index 0b65ee871d..4f42bebc3a 100755 --- a/config/install-sh +++ b/config/install-sh @@ -296,7 +296,7 @@ do || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \ || { echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2 - (exit 1); exit + (exit 1); exit 1 } else : @@ -307,12 +307,12 @@ do $doit $mvcmd "$dsttmp" "$dstdir/$dstfile" } } - fi || { (exit 1); exit; } + fi || { (exit 1); exit 1; } done # The final little trick to "correctly" pass the exit status to the exit trap. { - (exit 0); exit + (exit 0); exit 0 } # Local variables: