diff options
author | Mole Shang <[email protected]> | 2024-01-17 11:33:39 +0800 |
---|---|---|
committer | Mole Shang <[email protected]> | 2024-02-05 18:03:17 +0800 |
commit | 0d6a64fa06ce6aae729fa05a539eadd88fa59007 (patch) | |
tree | ae42de2d64325fc09285fd843851f017b1ef6a6b /user/sh.c | |
parent | b9af3ad894701e8805dd9f63e646487a7f09f9f3 (diff) | |
download | xv6-labs-0d6a64fa06ce6aae729fa05a539eadd88fa59007.tar.gz xv6-labs-0d6a64fa06ce6aae729fa05a539eadd88fa59007.tar.bz2 xv6-labs-0d6a64fa06ce6aae729fa05a539eadd88fa59007.zip |
lab util: finish
Diffstat (limited to 'user/sh.c')
-rw-r--r-- | user/sh.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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); |