summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main.c b/src/main.c
index 31d559d..b6dea21 100644
--- a/src/main.c
+++ b/src/main.c
@@ -341,7 +341,7 @@ find_dot_file(char *basename)
 int
 dotcmd(int argc, char **argv)
 {
-	exitstatus = 0;
+	int status = 0;
 
 	if (argc >= 2) {		/* That's what SVR2 does */
 		char *fullname;
@@ -351,8 +351,9 @@ dotcmd(int argc, char **argv)
 		commandname = fullname;
 		cmdloop(0);
 		popfile();
+		status = exitstatus;
 	}
-	return exitstatus;
+	return status;
 }