Use `(exit N); exit N', not `(exit N); exit'.
authorJim Meyering <jim@meyering.net>
Fri, 17 Dec 2004 08:12:52 +0000 (08:12 +0000)
committerJim Meyering <jim@meyering.net>
Fri, 17 Dec 2004 08:12:52 +0000 (08:12 +0000)
Otherwise, install-sh could exit with improper exit status when
exiting via a trapped interrupt.  Thanks to a report from Bob Proulx.

config/install-sh

index 0b65ee8..4f42beb 100755 (executable)
@@ -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: