732 Chapter 34
34-4. Modify the program in Listing 34-4 (disc_SIGHUP.c) to verify that, if the controlling
process doesn’t terminate as a consequence of receiving SIGHUP, then the kernel
doesn’t send SIGHUP to the members of the foreground process.
34-5. Suppose that, in the signal handler of Listing 34-6, the code that unblocks the
SIGTSTP signal was moved to the start of the handler. What potential race condition
does this create?
34-6. Write a program to verify that when a process in an orphaned process group
attempts to read() from the controlling terminal, the read() fails with the error EIO.
34-7. Write a program to verify that if one of the signals SIGTTIN, SIGTTOU, or SIGTSTP is sent
to a member of an orphaned process group, then the signal is discarded (i.e., has
no effect) if it would stop the process (i.e., the disposition is SIG_DFL), but is
delivered if a handler is installed for the signal.