On Fri, Feb 25, 2005 at 09:09:11PM +1100, herbert wrote:
> 
> Good catch.  We need to check whether the EXEVAL is thrown by a subshell
> and if so relay it to the top.
> 
> Please try these two patches instead.

We need one more patch.  EXEVAL should not modify the exit status.
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <[EMAIL PROTECTED]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
===== eval.c 1.100 vs edited =====
--- 1.100/src/eval.c    2005-02-25 21:15:30 +11:00
+++ edited/eval.c       2005-02-25 22:02:56 +11:00
@@ -874,6 +874,12 @@
                        i = exception;
                        if (i == EXEXIT)
                                goto raise;
+                       if (i == EXEVAL) {
+                               if (oldlvl == shlvl)
+                                       goto trap;
+                               else
+                                       goto raise;
+                       }
 
                        status = 2;
                        j = 0;
@@ -885,11 +891,11 @@
                                status = j + 128;
                        exitstatus = status;
 
-                       if (i == EXINT || (i != EXEVAL && spclbltin > 0) ||
-                           oldlvl != shlvl) {
+                       if (i == EXINT || spclbltin > 0) {
 raise:
                                longjmp(handler->loc, 1);
                        }
+trap:
                        FORCEINTON;
                }
                break;

Reply via email to