summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/eval.c11
-rw-r--r--src/eval.h1
-rw-r--r--src/main.c9
3 files changed, 5 insertions, 16 deletions
diff --git a/src/eval.c b/src/eval.c
index 66c2209..2f195af 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -309,15 +309,10 @@ setstatus:
 		break;
 	}
 out:
-	if ((checkexit & exitstatus))
-		evalskip |= SKIPEVAL;
-	else if (pendingsigs && dotrap())
-		goto exexit;
-
-	if (flags & EV_EXIT) {
-exexit:
+	if ((checkexit & exitstatus) ||
+	    (pendingsigs && dotrap()) ||
+	    (flags & EV_EXIT))
 		exraise(EXEXIT);
-	}
 }
 
 
diff --git a/src/eval.h b/src/eval.h
index 005620d..e190b28 100644
--- a/src/eval.h
+++ b/src/eval.h
@@ -59,4 +59,3 @@ extern int evalskip;
 #define SKIPCONT	(1 << 1)
 #define SKIPFUNC	(1 << 2)
 #define SKIPFILE	(1 << 3)
-#define SKIPEVAL	(1 << 4)
diff --git a/src/main.c b/src/main.c
index 7d07e2d..2bff956 100644
--- a/src/main.c
+++ b/src/main.c
@@ -243,7 +243,7 @@ cmdloop(int top)
 		skip = evalskip;
 		if (skip) {
 			evalskip = 0;
-			return skip & SKIPEVAL;
+			break;
 		}
 	}
 
@@ -259,17 +259,12 @@ cmdloop(int top)
 STATIC void
 read_profile(const char *name)
 {
-	int skip;
-
 	name = expandstr(name);
 	if (setinputfile(name, INPUT_PUSH_FILE | INPUT_NOFILE_OK) < 0)
 		return;
 
-	skip = cmdloop(0);
+	cmdloop(0);
 	popfile();
-
-	if (skip)
-		exitshell();
 }