Date: Sun, 23 Nov 2008 20:23:57 +0000 (UTC) From: Stefan Farfeleder <stefanf@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r185231 - head/bin/sh Message-ID: <200811232023.mANKNv1B063433@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: stefanf Date: Sun Nov 23 20:23:57 2008 New Revision: 185231 URL: http://svn.freebsd.org/changeset/base/185231 Log: Fix $? at the first command of a function. The previous exit status was saved twice and thus lost. Modified: head/bin/sh/eval.c Modified: head/bin/sh/eval.c ============================================================================== --- head/bin/sh/eval.c Sun Nov 23 20:19:35 2008 (r185230) +++ head/bin/sh/eval.c Sun Nov 23 20:23:57 2008 (r185231) @@ -791,6 +791,7 @@ evalcommand(union node *cmd, int flags, for (sp = varlist.list ; sp ; sp = sp->next) mklocal(sp->text); funcnest++; + exitstatus = oexitstatus; if (flags & EV_TESTED) evaltree(cmdentry.u.func, EV_TESTED); else
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200811232023.mANKNv1B063433>