summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorherbert <herbert@gondor.apana.org.au>2005-02-25 22:13:05 +1100
committerHerbert Xu <herbert@gondor.apana.org.au>2005-09-26 18:33:03 +1000
commit2337770e015bd73a8670ac8bc450b03b08d4aa87 (patch)
tree40a83a0bffc22a5e1006be4426a908d4b8150fac /src
parentSize optimisations with state/s in main(). (diff)
downloaddash-2337770e015bd73a8670ac8bc450b03b08d4aa87.tar.gz
dash-2337770e015bd73a8670ac8bc450b03b08d4aa87.zip
Do not clobber exit status on EXEVAL.
Diffstat (limited to 'src')
-rw-r--r--src/eval.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/eval.c b/src/eval.c
index f7f0aeb..29db5c1 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -874,6 +874,12 @@ bail:
 			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 @@ bail:
 				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;
June McEnroe 2019-09-16Add The Just CityJune McEnroe 2019-09-12Only GET the final redirect locationJune McEnroe 2019-09-12Consume entire bodyJune McEnroe Aborting the request and leaving data around may be causing intermittent errors. Just discard the rest of the data. 2019-09-10Add title -v flagJune McEnroe 2019-09-10Use curl error bufferJune McEnroe 2019-09-10Set Accept-Encoding in titleJune McEnroe Because apparently it's fine for servers to respond with Content-Encoding you didn't ask for, and curl won't decode it if you didn't ask for it. 2019-09-08Set title User-AgentJune McEnroe Some things don't like you if you don't send one. 2019-09-07Add -x flag to titleJune McEnroe 2019-09-07Ignore SIGPIPE in relayJune McEnroe Allows restarting consumers safely. 2019-09-07Add A Memory Called EmpireJune McEnroe 2019-09-05Handle lack of Content-TypeJune McEnroe 2019-09-05Use CURLINFO_CONTENT_TYPEJune McEnroe Oops, didn't see this. 2019-09-05Decode entities in titlesJune McEnroe 2019-09-05Print title as soon as it's availableJune McEnroe 2019-09-05Use CURL_PREFIX to set flagsJune McEnroe 2019-09-05Add titleJune McEnroe 2019-09-04Add Avorter n'est pas tuerJune McEnroe 2019-08-29Unset executable on shell scriptsJune McEnroe 2019-08-29Add long-missing setopt to bin.7June McEnroe 2019-08-29Add editJune McEnroe