HW10 A SIMPLE COMMAND SHELL PART 2
- Upload via Gradescope as:
shell208.c
GOALS
- Learn how to use pipes for inter-process communication
- Learn how to handle signals
Logistics
This is a paired assignment, so you should work with your partner from HW9. As usual, you can get help as detailed in the collaboration document. You should submit only one assignment to Gradescope for your pair and add your partner to the submission. If for some reason you and your partner can’t make things work, you can split, but you have to let me know asap.
This assignment is due Friday May 24th at 10pm. As with all assignments, you will have the opportunity to individually revise this submission based on feedback.
Assessment
To demonstrate proficiency, your submission needs to:
- Still support proficiency-level functionality from part 1
- Support “
command1 | command2
” (piping command1’s stdout to command2’s stdin, including command-line arguments for each command) - Support “
command < file
” (redirecting command’s stdin from a file)
To demonstrate mastery, your submission needs to:
- If a
SIGINT
signal is sent to the parent (shell) process, respond by printing “^C
” to stderr and printing the prompt again; to exit the shell, the user should type “exit” - Be well-styled and documented
Bonus challenge (not necessary for mastery, but cool to try):
- Support multi-pipe pipelines (you may impose a fixed limit of 7
|
’s if that helps)
YOUR ASSIGNMENT
Add features to your shell208 program that you started in Part 1, as detailed in the rubric above.
SUBMITTING YOUR WORK
Submit your program via Gradescope as described in Part 1.