Unix™ Systems Programming: Communication, Concurrency, and Threads
by Kay A. Robbins, Steven Robbins
Appendix B. Restart Library
The restart library is a collection of functions that restart themselves when they have not completed because of a possibly temporary event. We use functions from the restart library throughout the book to simplify programs that must deal with the effects of signals and incomplete I/O. The source code for the restart library is available on the book web site. We have included only those functions that are needed in the book. You can easily add other functions, if necessary.
The restart library addresses two main types of events: interruption by a signal and incomplete I/O. For example, many library functions, including read and write, return –1 and set errno to EINTR when interrupted by a signal before any I/O takes ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access