[Bug 407] assign local vars and catch returncode

bugzilla at busybox.net bugzilla at busybox.net
Sat Jun 20 11:13:47 UTC 2009


https://bugs.busybox.net/show_bug.cgi?id=407





--- Comment #4 from Mike Frysinger <vapier at gentoo.org>  2009-06-20 11:13:46 UTC ---
what you're trying to do and what behavior you have a problem with still isnt
clear.  instead of talking in pseudo code, post a small example of real code
that isnt behavior the way you want.

f() { return 1; }
f
if [ $? -eq 1 ] ; then
  echo "this should be executed"
else
  echo "this should not be executed"
fi

the handling of local in hush should match bash because (1) local is not in
POSIX so we have no official spec and (2) bash is the most widely used shell,
so differing in behavior is just brain dead.


-- 
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


More information about the busybox-cvs mailing list