Lab 7: Signals

You are given a basic signal handling program to start with. Your job in this lab is to extend it to:

Sending Signals

You can send a signal to a process with the kill command:

kill -s SIGQUIT <pid>

The example program prints its PID when starting up, so you can open another terminal and then use the kill command to send the signals.

In the Shell

Think about how the basic shell we built in class might use signals. If you’ve implemented most of the functionality we’ve covered, try executing a long-running program and sending SIGINT with Ctrl+C to observe what happens.

Grading and Submission

Once you are finished with the lab, check your code into a directory called lab7 in your lab repository.

To receive full credit for this lab: