Re: Declaring variables as local effects command status $?

2009-02-06 Thread Chet Ramey
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

Re: Declaring variables as local effects command status $?

2009-02-06 Thread Paul Jarc
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

Declaring variables as local effects command status $?

2009-02-06 Thread Michael Rendell
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

Re: bash cores if nscd disabled on Solaris LDAP sasl/gssapi client

2009-02-06 Thread serge
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