Michael Rendell wrote:
> Bash Version: 3.2
> Patch Level: 25
> Release Status: release
>
> Description:
> Declaring a variable as local appears to prevent $? from being set;
> see script below.
`local' is a builtin command; you asked for and received its exit status.
Chet
--
``The
Michael Rendell wrote:
> local x=$( echo hi; exit 20);
> ret=$?
Here you're getting the exit status of "local" itself, which is 0. If
you want the exit status of the command substitution, make that a
separate command:
local x
x=$( echo hi; exit 20);
paul
Configuration Information [Automatically generated, do not change]:
Machine: i686
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i686'
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i686-redhat-linux-gnu'
-DCONF_VENDOR='redhat' -DLOCALEDIR='/usr/share/locale' -DPAC
Hi Chet,
Serge Dussud wrote:
On 12/ 8/08 03:00 PM, Chet Ramey wrote:
Serge Dussud wrote:
Indeed, ld(1)'s -z interpose option is a rather big hammer, as it
establishes that the application can interpose on *all* of the symbols
that it offers, rather than just the few related to malloc.
Th