summaryrefslogtreecommitdiff
path: root/user/sh.c
diff options
context:
space:
mode:
authorMole Shang <[email protected]>2024-02-16 10:20:27 +0800
committerMole Shang <[email protected]>2024-02-16 10:20:27 +0800
commita98c56a811142e5ede3332a7a444cca45f628769 (patch)
treec93ff7090da7b6ef911932be283818c2f6a03784 /user/sh.c
parent0d65be5d1d880afafbf08c2adb605cf9f72216e2 (diff)
parent99015f3a985b2fd051606636743a2a2969b216e8 (diff)
downloadxv6-labs-a98c56a811142e5ede3332a7a444cca45f628769.tar.gz
xv6-labs-a98c56a811142e5ede3332a7a444cca45f628769.tar.bz2
xv6-labs-a98c56a811142e5ede3332a7a444cca45f628769.zip
Merge branch 'lock' into thread
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);