cgit: Added cgit 0.7.3-c502865 - A CGI for git written in C
[opensde-package-nopast.git] / shells / pdksh / pdksh-5.2.14-2.patch
blobe0b25c2694f370833013a9494cbb1bf8844530a1
1 # --- SDE-COPYRIGHT-NOTE-BEGIN ---
2 # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
4 # Filename: package/.../pdksh/pdksh-5.2.14-2.patch
5 # Copyright (C) 2004 - 2006 The T2 SDE Project
6 # Copyright (C) 1998 - 2003 Clifford Wolf
8 # More information can be found in the files COPYING and README.
10 # This patch file is dual-licensed. It is available under the license the
11 # patched project is licensed under, as long as it is an OpenSource license
12 # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
13 # of the GNU General Public License as published by the Free Software
14 # Foundation; either version 2 of the License, or (at your option) any later
15 # version.
16 # --- SDE-COPYRIGHT-NOTE-END ---
19 [ ftp://ftp.cs.mun.ca/pub/pdksh/pdksh-5.2.14-patches.2 ]
21 --- ./exec.c.a Mon Jan 29 10:02:13 2001
22 +++ ./exec.c Mon Jan 29 10:06:57 2001
23 @@ -76,6 +76,7 @@
25 int i;
26 volatile int rv = 0;
27 + volatile int rv_prop = 0; /* rv being propogated or newly generated? */
28 int pv[2];
29 char ** volatile ap;
30 char *s, *cp;
31 @@ -157,6 +158,7 @@
33 case TPAREN:
34 rv = execute(t->left, flags|XFORK);
35 + rv_prop = 1;
36 break;
38 case TPIPE:
39 @@ -275,6 +277,7 @@
40 rv = execute(t->right, flags & XERROK);
41 else
42 flags |= XERROK;
43 + rv_prop = 1;
44 break;
46 case TBANG:
47 @@ -323,6 +326,7 @@
50 rv = 0; /* in case of a continue */
51 + rv_prop = 1;
52 if (t->type == TFOR) {
53 while (*ap != NULL) {
54 setstr(global(t->str), *ap++, KSH_SS_UNWIND_ERROR);
55 @@ -334,6 +338,7 @@
56 for (;;) {
57 if (!(cp = do_selectargs(ap, is_first))) {
58 rv = 1;
59 + rv_prop = 0;
60 break;
62 is_first = FALSE;
63 @@ -365,6 +370,7 @@
64 rv = 0; /* in case of a continue */
65 while ((execute(t->left, XERROK) == 0) == (t->type == TWHILE))
66 rv = execute(t->right, flags & XERROK);
67 + rv_prop = 1;
68 break;
70 case TIF:
71 @@ -374,6 +380,7 @@
72 rv = execute(t->left, XERROK) == 0 ?
73 execute(t->right->left, flags & XERROK) :
74 execute(t->right->right, flags & XERROK);
75 + rv_prop = 1;
76 break;
78 case TCASE:
79 @@ -386,10 +393,12 @@
80 break;
81 Found:
82 rv = execute(t->left, flags & XERROK);
83 + rv_prop = 1;
84 break;
86 case TBRACE:
87 rv = execute(t->left, flags & XERROK);
88 + rv_prop = 1;
89 break;
91 case TFUNCT:
92 @@ -401,6 +410,7 @@
93 * (allows "ls -l | time grep foo").
95 rv = timex(t, flags & ~XEXEC);
96 + rv_prop = 1;
97 break;
99 case TEXEC: /* an eval'd TCOM */
100 @@ -428,7 +438,7 @@
101 quitenv(); /* restores IO */
102 if ((flags&XEXEC))
103 unwind(LEXIT); /* exit child */
104 - if (rv != 0 && !(flags & XERROK)) {
105 + if (rv != 0 && !rv_prop && !(flags & XERROK)) {
106 if (Flag(FERREXIT))
107 unwind(LERROR);
108 trapsig(SIGERR_);