]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
* install-sh: Use `(exit N); exit N', not `(exit N); exit'.
authorAlexandre Duret-Lutz <adl@gnu.org>
Fri, 17 Dec 2004 23:25:09 +0000 (23:25 +0000)
committerAlexandre Duret-Lutz <adl@gnu.org>
Fri, 17 Dec 2004 23:25:09 +0000 (23:25 +0000)
Otherwise, install-sh could exit with improper exit status when
exiting via a trapped interrupt.  Thanks to a report from Bob Proulx.

ChangeLog
lib/install-sh

index e70bcfe750084374f9773e192d4f0b0a5a75c539..5344651950810803f71b839aa336ce66aaf3e9aa 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2004-12-17  Jim Meyering  <jim@meyering.net>
+
+       * install-sh: 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.
+
 2004-12-14  Akim Demaille  <akim@epita.fr>
 
        * doc/automake.texi (Options): Englishoes.
index 0b65ee871d33c7ab1e6ec36b86dda87e0d85c6ee..6ebe46de6cf49d03fd433ff1b6d11e031ce22dea 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh
 # install - install a program, script, or datafile
 
-scriptversion=2004-10-22.00
+scriptversion=2004-12-17.09
 
 # This originates from X11R5 (mit/util/scripts/install.sh), which was
 # later released in X11R6 (xc/config/util/install.sh) with the
@@ -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: