Assignment 2

Due Date: Monday Oct. 12

1. Modify your shell from the previous assignment so that SIGINT, SIGQUIT, and SIGSTOP are handled correctly, as discussed in class.

2. Frequently, a parent and child process must be synchronized. That is, when the parent reaches point A it must wait for the child to reach point B before proceeding or vice versa. For example, the child might need to wait for the parent to finish creating a data file before execing a program that uses that file. Create a set of functions that use signals to perform such synchronization (use SIGUSR1 an/or SIGUSR2). You may assume that the parent is synchronizing with a single child.

If possible, support multiple synchronization points, i.e., each process having multiple places where it waits for the other process to finish a task.

Analyze the potential bugs in your solution.