diff options
author | Mole Shang <[email protected]> | 2024-01-17 11:33:39 +0800 |
---|---|---|
committer | Mole Shang <[email protected]> | 2024-01-18 14:25:09 +0800 |
commit | 33ca12a4653752d179e6296c7ca2f91a626d30f3 (patch) | |
tree | 819af498462a8a0f725c408c08aa0dae53f6f07b /user/sh.c | |
parent | e6ef31e4b30af1f30a4d1385971df602a8446cac (diff) | |
download | xv6-labs-33ca12a4653752d179e6296c7ca2f91a626d30f3.tar.gz xv6-labs-33ca12a4653752d179e6296c7ca2f91a626d30f3.tar.bz2 xv6-labs-33ca12a4653752d179e6296c7ca2f91a626d30f3.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); |