Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint

20.16. Exercises

  1. As noted in Section 20.3, sigaction() is more portable than signal() for establishing a signal handler. Replace the use of signal() by sigaction() in the program in Example 20-7 (sig_receiver.c).

  2. Write a program that shows that when the disposition of a pending signal is changed to be SIG_IGN, the program never sees (catches) the signal.

  3. Write programs that verify the effect of the SA_RESETHAND and SA_NODEFER flags when establishing a signal handler with sigaction().

  4. Implement the siginterrupt() function described in Section 21.5 using sigaction().


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial