CS 284 Operating Systems
Programming Assignment #3
Due: 9/5/2001 - Class Time
Write a C program that performs a printf(..) describing all significant events
during the execution of the following outline:
int main()
- what is my pid and my parent's pid
- fork() - was it successful?
- the new child process should
- announce its birth
- sleep(3)
- system("ps -alLy");
- what is its pid and its parent's pid
- execv(program #1 which expects arguments - DON'T HARD CODE THESE ARGUMENTS)
- include standard safeguards
- exit
- the parent should announce the creation of a child process
- tell the child's pid
- waitpid(.., .., ..) for the child to die
- announce the child's death
- exit or return
=================================================================
You will use the 'script' command to capture all necessary information for
handin.