FreeBSD Bugzilla – Attachment 15591 Details for
Bug 28852
behavior of /bin/sh with -e option looks incorrect
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 1.68 KB, created by
mori
on 2001-07-10 01:40:01 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
mori
Created:
2001-07-10 01:40:01 UTC
Size:
1.68 KB
patch
obsolete
>Index: eval.c >=================================================================== >RCS file: /opt/cvs/FreeBSD/src/bin/sh/eval.c,v >retrieving revision 1.27.2.3 >diff -u -r1.27.2.3 eval.c >--- eval.c 2001/07/05 00:41:14 1.27.2.3 >+++ eval.c 2001/07/09 23:55:18 >@@ -208,7 +208,6 @@ > case NAND: > evaltree(n->nbinary.ch1, EV_TESTED); > if (evalskip || exitstatus != 0) { >- flags |= EV_TESTED; > goto out; > } > evaltree(n->nbinary.ch2, flags); >@@ -249,25 +248,9 @@ > break; > case NFOR: > evalfor(n); >- /* >- * The 'for' command does not set exitstatus, so the value >- * now in exitstatus is from the last command executed in >- * the 'for' loop. That exit value had been tested (wrt >- * 'sh -e' checking) while processing that command, and >- * it should not be re-tested here. >- */ >- flags |= EV_TESTED; > break; > case NCASE: > evalcase(n, flags); >- /* >- * The 'case' command does not set exitstatus, so the value >- * now in exitstatus is from the last command executed in >- * the 'case' block. That exit value had been tested (wrt >- * 'sh -e' checking) while processing that command, and >- * it should not be re-tested here. >- */ >- flags |= EV_TESTED; > break; > case NDEFUN: > defun(n->narg.text, n->narg.next); >@@ -292,14 +275,8 @@ > out: > if (pendingsigs) > dotrap(); >- /* >- * XXX - Like "!(n->type == NSEMI)", more types will probably >- * need to be excluded from this test. It's probably better >- * to set or unset EV_TESTED in the loop above than to bloat >- * the conditional here. >- */ > if ((flags & EV_EXIT) || (eflag && exitstatus >- && !(flags & EV_TESTED) && !(n->type == NSEMI))) >+ && !(flags & EV_TESTED) && (n->type == NCMD))) > exitshell(exitstatus); > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 28852
: 15591