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 | |
LAB ASSIGNMENT |
For this lab, you need to complete the implementation of the
The TA should be able to build the program using the Makefile submitted with your solution. 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 . . . |
WHAT TO HAND IN |
After you have finished your implementation, you need to complete a short report that answers the following questions:
make tar |