Programming Assignment 1
In this assignment, you are tasked to expand the functionality of a shell as well as a daemon process, both of which are the common applications of fork()
.
The assignment is written entirely in C. At the end of this assignment, you should be able to:
- Create a shell and wait for user input
- Write several other system programs that can be invoked by the shell
- Parse user input and invoke
fork()
with the appropriate program - Create a program that results in a daemon process
- Use your shell to keep track of the state of your daemon processes
- Create and maintain environment variables
- Customise your shell via simple
.rc
file
You may complete this assignment in groups of 2-3 pax. Indicate your partner’s name in the google sheet provided in our course handout.
Starter Code
You might want to run this assignment in your POSIX compliant OS, using gcc
version 10.X or below. Using version 11.X and above might be okay, but the bot is running gcc 10
version so if you use some newer fancy stuffs then the bot might not be able to run it. You can try first.
You should have joined the GitHub Classroom and obtain the starter code for this assignment there. The link can be found in the Course Calendar portion of your Course Handout.
Submission
Simply push your completed shell code to the github classroom repository by the stipulated due date in the course handout. You will then meet our TAs/instructors for a live demo (checkoff, schedule in course handout). You are to expand the shell to implement various additional functionalities that will be elaborated throughout this assignment’s handout. Read along to find out more.
Your shell should NOT crash due to any input from the user or any ABSENCE of input from the user after the given command.