590 Chapter 27
27-5. When we run the following program, we find it produces no output. Why is this?
#include "tlpi_hdr.h"
int
main(int argc, char *argv[])
{
printf("Hello world");
execlp("sleep", "sleep", "0", (char *) NULL);
}
27-6. Suppose that a parent process has established a handler for SIGCHLD and also
blocked this signal. Subsequently, one of its children exits, and the parent then
does a wait() to collect the child’s status. What happens when the parent unblocks
SIGCHLD? Write a program to verify your answer. What is the relevance of the result
for a program calling the system() function?