Exercises

  1. Write a procedure that defines reasonable default handlers for all signals.

  2. Write a script that sends signals back to itself. Do the signals arrive while the kill command is still executing? After? Long after? What happens when the system is heavily loaded?

  3. On page 315, I described several problems that signals can cause even when they are caught and handled. Do these problems apply to any example scripts in this book?

  4. Write a script without using signals. Reread the first sentence in this chapter.

Get Exploring Expect now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.