summaryrefslogtreecommitdiff
path: root/user/sh.c
diff options
context:
space:
mode:
Diffstat (limited to 'user/sh.c')
-rw-r--r--user/sh.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/user/sh.c b/user/sh.c
index 836ebcb..5eceda0 100644
--- a/user/sh.c
+++ b/user/sh.c
@@ -165,6 +165,9 @@ main(void)
fprintf(2, "cannot cd %s\n", buf+3);
continue;
}
+ if(buf[0] == 'e' && buf[1] == 'x' && buf[2] == 'i' && buf[3] == 't'){
+ exit(0);
+ }
if(fork1() == 0)
runcmd(parsecmd(buf));
wait(0);