summaryrefslogtreecommitdiff
path: root/user/sh.c
diff options
context:
space:
mode:
authorMole Shang <[email protected]>2024-02-10 13:46:25 +0800
committerMole Shang <[email protected]>2024-02-10 13:50:34 +0800
commit3673a2cdfb30e1e3936e695a3fb8adee74488d6b (patch)
tree282b4677f47bbb15949e24b3bfa455b173a38a29 /user/sh.c
parentf379c1c4c80947365eb6c4046c3ab165629dc8cd (diff)
parentc9284cd93525436cc823258ab309c1b27eeec714 (diff)
downloadxv6-labs-3673a2cdfb30e1e3936e695a3fb8adee74488d6b.tar.gz
xv6-labs-3673a2cdfb30e1e3936e695a3fb8adee74488d6b.tar.bz2
xv6-labs-3673a2cdfb30e1e3936e695a3fb8adee74488d6b.zip
Merge branch 'pgtbl' into traps
Conflicts: .gitignore Makefile conf/lab.mk
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);