Skip to content

bkindtoevery1/sp_03

Repository files navigation

System Programming report

20195155 임채현 bkindtoevery1@gist.ac.kr

(a) How to compile and how to execute? LINUX, CYGWIN, or WSL?

I used Ubuntu 20.04, which can be dual-booted with windows 10. You can compile this for the following steps.

  1. unzip the zip file
  2. change the directory into the folder
  3. type make

And then the executable file named minish would be made. Finally, type ./minish to execute.

(b), (c) What functionality was implemented? How was it implemented? (explain briefly)

1. Basic execution of commands.

ex_screenshot minish can execute linux commands which are in the /bin folder. It correctly executed because execvp(location, args) function is used.

ex_screenshot minish can be terminated using quit command. It is correct because if strcmp(args[0], "quit") == 0, then the program will exit(0).

2. Signals

ex_screenshot minish doesn't affect by SIGINT(Ctrl+c), because signal(SIGINT, sig_int) function is used.

3. Prompt

ex_screenshot 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.

4. Redirection

ex_screenshot The result of ls-al is writed in a.txt. It was successful because dup2(fd, STDOUT_FILENO);function is used.

5. Pipe

ex_screenshot It didn't successful.. Just executed front side of the pipe.

(d) Conclusion

I made the basic minish which satisfies the minimum spec without pipe, but didn't made the additional requirement.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors