📄 tshref.out
字号:
make[1]: Entering directory `/afs/cs.cmu.edu/academic/class/15213-s03/private/L5/src'./sdriver.pl -t trace01.txt -s ./tsh -a "-p"## trace01.txt - Properly terminate on EOF.#./sdriver.pl -t trace02.txt -s ./tsh -a "-p"## trace02.txt - Process builtin quit command.#./sdriver.pl -t trace03.txt -s ./tsh -a "-p"## trace03.txt - Run a foreground job.#tsh> quit./sdriver.pl -t trace04.txt -s ./tsh -a "-p"## trace04.txt - Run a background job.#tsh> ./myspin 1 &[1] (21797) ./myspin 1 &./sdriver.pl -t trace05.txt -s ./tsh -a "-p"## trace05.txt - Process jobs builtin command.#tsh> ./myspin 2 &[1] (21801) ./myspin 2 &tsh> ./myspin 3 &[2] (21803) ./myspin 3 &tsh> jobs[1] (21801) Running ./myspin 2 &[2] (21803) Running ./myspin 3 &./sdriver.pl -t trace06.txt -s ./tsh -a "-p"## trace06.txt - Forward SIGINT to foreground job.#tsh> ./myspin 4Job [1] (21808) terminated by signal 2./sdriver.pl -t trace07.txt -s ./tsh -a "-p"## trace07.txt - Forward SIGINT only to foreground job.#tsh> ./myspin 4 &[1] (21812) ./myspin 4 &tsh> ./myspin 5Job [2] (21814) terminated by signal 2tsh> jobs[1] (21812) Running ./myspin 4 &./sdriver.pl -t trace08.txt -s ./tsh -a "-p"## trace08.txt - Forward SIGTSTP only to foreground job.#tsh> ./myspin 4 &[1] (21819) ./myspin 4 &tsh> ./myspin 5Job [2] (21821) stopped by signal 20tsh> jobs[1] (21819) Running ./myspin 4 &[2] (21821) Stopped ./myspin 5 ./sdriver.pl -t trace09.txt -s ./tsh -a "-p"## trace09.txt - Process bg builtin command#tsh> ./myspin 4 &[1] (21826) ./myspin 4 &tsh> ./myspin 5Job [2] (21828) stopped by signal 20tsh> jobs[1] (21826) Running ./myspin 4 &[2] (21828) Stopped ./myspin 5 tsh> bg %2[2] (21828) ./myspin 5 tsh> jobs[1] (21826) Running ./myspin 4 &[2] (21828) Running ./myspin 5 ./sdriver.pl -t trace10.txt -s ./tsh -a "-p"## trace10.txt - Process fg builtin command. #tsh> ./myspin 4 &[1] (21835) ./myspin 4 &tsh> fg %1Job [1] (21835) stopped by signal 20tsh> jobs[1] (21835) Stopped ./myspin 4 &tsh> fg %1tsh> jobs./sdriver.pl -t trace11.txt -s ./tsh -a "-p"## trace11.txt - Forward SIGINT to every process in foreground process group#tsh> ./mysplit 4Job [1] (21843) terminated by signal 2tsh> /bin/ps a PID TTY STAT TIME COMMAND21268 pts/1 S 0:00 -tcsh21298 pts/1 S 0:00 emacs tsh.c21300 pts/1 S 0:00 emacs tshpipe.c21784 pts/1 S 0:00 make tshref.out21785 pts/1 S 0:00 /bin/sh -c make tests > tshref.out 2>&121786 pts/1 S 0:00 make tests21840 pts/1 S 0:00 perl ./sdriver.pl -t trace11.txt -s ./tsh -a -p21841 pts/1 S 0:00 ./tsh -p21846 pts/1 R 0:00 /bin/ps a./sdriver.pl -t trace12.txt -s ./tsh -a "-p"## trace12.txt - Forward SIGTSTP to every process in foreground process group#tsh> ./mysplit 4Job [1] (21850) stopped by signal 20tsh> jobs[1] (21850) Stopped ./mysplit 4 tsh> /bin/ps a PID TTY STAT TIME COMMAND21268 pts/1 S 0:00 -tcsh21298 pts/1 S 0:00 emacs tsh.c21300 pts/1 S 0:00 emacs tshpipe.c21784 pts/1 S 0:00 make tshref.out21785 pts/1 S 0:00 /bin/sh -c make tests > tshref.out 2>&121786 pts/1 S 0:00 make tests21847 pts/1 S 0:00 perl ./sdriver.pl -t trace12.txt -s ./tsh -a -p21848 pts/1 S 0:00 ./tsh -p21850 pts/1 T 0:00 ./mysplit 421851 pts/1 T 0:00 ./mysplit 421854 pts/1 R 0:00 /bin/ps a./sdriver.pl -t trace13.txt -s ./tsh -a "-p"## trace13.txt - Restart every stopped process in process group#tsh> ./mysplit 4Job [1] (21858) stopped by signal 20tsh> jobs[1] (21858) Stopped ./mysplit 4 tsh> /bin/ps a PID TTY STAT TIME COMMAND21268 pts/1 S 0:00 -tcsh21298 pts/1 S 0:00 emacs tsh.c21300 pts/1 S 0:00 emacs tshpipe.c21784 pts/1 S 0:00 make tshref.out21785 pts/1 S 0:00 /bin/sh -c make tests > tshref.out 2>&121786 pts/1 S 0:00 make tests21855 pts/1 S 0:00 perl ./sdriver.pl -t trace13.txt -s ./tsh -a -p21856 pts/1 S 0:00 ./tsh -p21858 pts/1 T 0:00 ./mysplit 421859 pts/1 T 0:00 ./mysplit 421862 pts/1 R 0:00 /bin/ps atsh> fg %1tsh> /bin/ps a PID TTY STAT TIME COMMAND21268 pts/1 S 0:00 -tcsh21298 pts/1 S 0:00 emacs tsh.c21300 pts/1 S 0:00 emacs tshpipe.c21784 pts/1 S 0:00 make tshref.out21785 pts/1 S 0:00 /bin/sh -c make tests > tshref.out 2>&121786 pts/1 S 0:00 make tests21855 pts/1 S 0:00 perl ./sdriver.pl -t trace13.txt -s ./tsh -a -p21856 pts/1 S 0:00 ./tsh -p21865 pts/1 R 0:00 /bin/ps a./sdriver.pl -t trace14.txt -s ./tsh -a "-p"## trace14.txt - Simple error handling#tsh> ./bogus./bogus: Command not foundtsh> ./myspin 4 &[1] (21871) ./myspin 4 &tsh> fgfg command requires PID or %jobid argumenttsh> bgbg command requires PID or %jobid argumenttsh> fg afg: argument must be a PID or %jobidtsh> bg abg: argument must be a PID or %jobidtsh> fg 9999999(9999999): No such processtsh> bg 9999999(9999999): No such processtsh> fg %2%2: No such jobtsh> fg %1Job [1] (21871) stopped by signal 20tsh> bg %2%2: No such jobtsh> bg %1[1] (21871) ./myspin 4 &tsh> jobs[1] (21871) Running ./myspin 4 &./sdriver.pl -t trace15.txt -s ./tsh -a "-p"## trace15.txt - Putting it all together#tsh> ./bogus./bogus: Command not foundtsh> ./myspin 10Job [1] (21888) terminated by signal 2tsh> ./myspin 3 &[1] (21890) ./myspin 3 &tsh> ./myspin 4 &[2] (21892) ./myspin 4 &tsh> jobs[1] (21890) Running ./myspin 3 &[2] (21892) Running ./myspin 4 &tsh> fg %1Job [1] (21890) stopped by signal 20tsh> jobs[1] (21890) Stopped ./myspin 3 &[2] (21892) Running ./myspin 4 &tsh> bg %3%3: No such jobtsh> bg %1[1] (21890) ./myspin 3 &tsh> jobs[1] (21890) Running ./myspin 3 &[2] (21892) Running ./myspin 4 &tsh> fg %1tsh> quit./sdriver.pl -t trace16.txt -s ./tsh -a "-p"## trace16.txt - Tests whether the shell can handle SIGTSTP and SIGINT# signals that come from other processes instead of the terminal.#tsh> ./mystop 2Job [1] (21904) stopped by signal 20tsh> jobs[1] (21904) Stopped ./mystop 2tsh> ./myint 2Job [2] (21907) terminated by signal 2./sdriver.pl -t trace17.txt -s ./tsh -a "-p"## trace17.txt - Properly handle Input and Output Redirection.#tsh> ./myrw < myinputInput!!!!!!!!!!tsh> /bin/touch myoutputtsh> /bin/rm myoutputtsh> /bin/ps > myoutputtsh> /bin/cat myoutput PID TTY TIME CMD21268 pts/1 00:00:00 tcsh21298 pts/1 00:00:00 emacs21300 pts/1 00:00:00 emacs21784 pts/1 00:00:00 make21785 pts/1 00:00:00 sh21786 pts/1 00:00:00 make21908 pts/1 00:00:00 sdriver.pl21909 pts/1 00:00:00 tsh21917 pts/1 00:00:00 pstsh> /bin/rm myoutputtsh> /bin/ps PID TTY TIME CMD21268 pts/1 00:00:00 tcsh21298 pts/1 00:00:00 emacs21300 pts/1 00:00:00 emacs21784 pts/1 00:00:00 make21785 pts/1 00:00:00 sh21786 pts/1 00:00:00 make21908 pts/1 00:00:00 sdriver.pl21909 pts/1 00:00:00 tsh21923 pts/1 00:00:00 pstsh> quit./sdriver.pl -t trace18.txt -s ./tsh -a "-p"## trace18.txt - Properly handle Input and Output Redirection# simultaneously.#tsh> /bin/touch myoutputtsh> /bin/rm myoutputtsh> ./myrw < myinput > myoutputtsh> /bin/cat myoutputInput!!!!!!!!!!tsh> /bin/rm myoutputtsh> ./myrw > myoutput < myinputtsh> /bin/cat myoutputInput!!!!!!!!!!tsh> /bin/rm myoutputtsh> quit./sdriver.pl -t trace19.txt -s ./tsh -a "-p"## trace19.txt - Properly handle Input and Output Redirection# errors.#tsh> /bin/touch myoutputtsh> /bin/rm myoutputtsh> ./myrw < myinput < myoutputError: Ambiguous I/O redirectiontsh> ./myrw < myoutputError: myoutput No such file or directorytsh> quit./sdriver.pl -t trace20.txt -s ./tsh -a "-p"## trace20.txt - Putting it all together, yet again#tsh> ./bogus./bogus: Command not foundtsh> ./myspin 10Job [1] (21958) terminated by signal 2tsh> ./myspin 3 &[1] (21960) ./myspin 3 &tsh> ./myspin 4 &[2] (21962) ./myspin 4 &tsh> jobs[1] (21960) Running ./myspin 3 &[2] (21962) Running ./myspin 4 &tsh> fg %1Job [1] (21960) stopped by signal 20tsh> jobs[1] (21960) Stopped ./myspin 3 &[2] (21962) Running ./myspin 4 &tsh> bg %3%3: No such jobtsh> bg %1[1] (21960) ./myspin 3 &tsh> jobs[1] (21960) Running ./myspin 3 &[2] (21962) Running ./myspin 4 &tsh> fg %1tsh> /bin/touch myoutputtsh> /bin/rm myoutputtsh> ./myrw < myinput > myoutputtsh> /bin/cat myoutputInput!!!!!!!!!!tsh> /bin/rm myoutputtsh> ./myrw > myoutput < myinputtsh> /bin/cat myoutputInput!!!!!!!!!!tsh> /bin/rm myoutputtsh> quitmake[1]: Leaving directory `/afs/cs.cmu.edu/academic/class/15213-s03/private/L5/src'
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -