| 20195155 | 임채현 | bkindtoevery1@gist.ac.kr |
|---|
I used Ubuntu 20.04, which can be dual-booted with windows 10. You can compile this for the following steps.
- unzip the zip file
- change the directory into the folder
- type
make
And then the executable file named minish would be made.
Finally, type ./minish to execute.
minish can execute linux commands which are in the /bin folder.
It correctly executed because execvp(location, args) function is used.
minish can be terminated using quit command.
It is correct because if strcmp(args[0], "quit") == 0, then the program will exit(0).
minish doesn't affect by SIGINT(Ctrl+c), because signal(SIGINT, sig_int) function is used.
As you can see in the picture, the location of the file is printed in terminal. It is correct because getcwd(pwd, 500) function is used.
The result of ls-al is writed in a.txt.
It was successful because dup2(fd, STDOUT_FILENO);function is used.
It didn't successful.. Just executed front side of the pipe.
I made the basic minish which satisfies the minimum spec without pipe, but didn't made the additional requirement.