Lab 2: POSIX Signals |
In this lab, we will learn about using POSIX (Unix) signals. The POSIX standard for signals, as with most of its components was based on UNIX semantics, but generalized to avoid explicitly endorsing one version of UNIX or another. The POSIX standard for signals and other aspects of system support are often supported by other operating systems. As with the other labs in this class we will experiment with signals in the context of Linux. We will also construct a small program which associates signal handlers with a few signals to give more interesting functionality to the starter code provided.
In this lab we will ensure you see how signals are used by BASH to support job control, which is an interesting feature, if slightly less widely used than it was a number of years ago. We will also look at a simple user program and change it in ways demonstrating:
Lab Materials |
Assignment |
For this lab, you need to complete the implementation of the
An example output of running signals is shown below:
bash> ./signals ^C^C^C^C^C Really exit? [Y/n]: n Continuing ^C^C^C^Z So far, '3' Ctl-C presses were counted ^C^Z So far, '4' Ctl-C presses were counted ^C Really exit? [Y/n]: n Continuing ^C^C^C^C^C Really exit? [Y/n]: User taking too long to respond. Exiting . . .
When you're finished |
make zip
Evaluation |
The total marks for this lab will be awarded based on the submission of your code and your quiz answers.