From: Pavel Roskin Date: Mon, 26 Feb 2001 22:05:51 +0000 (+0000) Subject: * autoupdate.in: Preserve exit status of the failed command when X-Git-Tag: autoconf-2.50~111 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a3e2a92f9d2f74b36a5cb8e67696025c7273e129;p=thirdparty%2Fautoconf.git * autoupdate.in: Preserve exit status of the failed command when die() follows system() by dividing $! by 256. --- diff --git a/ChangeLog b/ChangeLog index 282c74516..bdbbf0fee 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2001-02-26 Pavel Roskin + + * autoupdate.in: Preserve exit status of the failed command when + die() follows system() by dividing $! by 256. + 2001-02-26 Akim Demaille * acgeneral.m4 (AH_VERBATIM, AH_TEMPLATE): New, use AS_ESCAPE, not diff --git a/autoupdate.in b/autoupdate.in index c136347b9..867834b95 100644 --- a/autoupdate.in +++ b/autoupdate.in @@ -461,8 +461,8 @@ EOF if $verbose; if (system ("$m4 $tmp/input.m4 >$tmp/updated")) { - # FIXME: This guy is supposed to exit with a proper - # exit status, but it does not. Help is needed. + # Exit status of system() is in the upper byte. + $! >>= 8; die "$me: cannot update \`$filename'\n"; }; diff --git a/autoupdate.sh b/autoupdate.sh index c136347b9..867834b95 100644 --- a/autoupdate.sh +++ b/autoupdate.sh @@ -461,8 +461,8 @@ EOF if $verbose; if (system ("$m4 $tmp/input.m4 >$tmp/updated")) { - # FIXME: This guy is supposed to exit with a proper - # exit status, but it does not. Help is needed. + # Exit status of system() is in the upper byte. + $! >>= 8; die "$me: cannot update \`$filename'\n"; }; diff --git a/bin/autoupdate.in b/bin/autoupdate.in index c136347b9..867834b95 100644 --- a/bin/autoupdate.in +++ b/bin/autoupdate.in @@ -461,8 +461,8 @@ EOF if $verbose; if (system ("$m4 $tmp/input.m4 >$tmp/updated")) { - # FIXME: This guy is supposed to exit with a proper - # exit status, but it does not. Help is needed. + # Exit status of system() is in the upper byte. + $! >>= 8; die "$me: cannot update \`$filename'\n"; };