Open System Services Programmer's Guide
Example 88 (page 393) demonstrates handling the SIGCHLD signal. This example creates two
threads, each of which call fork(). When the child process executes, the process raises the
SIGCHLD signal. The SIGCHLD signal is delivered to the correct thread, and sigaction()
function in the example defines the action to be taken. Sample output:
sigaction for thread1 returned 0
sigaction for thread2 returned 0
Inside Child of Thread2
Signal received for Thread2 is 18
Inside Child of Thread1
Signal received for Thread1 is 18
Main Completed
392 Using the POSIX User Thread (PUT) Model Library