Skip to Content
Advanced Programming in the UNIX® Environment, Third Edition
book

Advanced Programming in the UNIX® Environment, Third Edition

by W. Richard Stevens, Stephen A. Rago
May 2013
Intermediate to advanced
1024 pages
34h 32m
English
Addison-Wesley Professional
Content preview from Advanced Programming in the UNIX® Environment, Third Edition

14. Advanced I/O

14.1. Introduction

This chapter covers numerous topics and functions that we lump under the term advanced I/O: nonblocking I/O, record locking, I/O multiplexing (the select and poll functions), asynchronous I/O, the readv and writev functions, and memory-mapped I/O (mmap). We need to cover these topics before describing interprocess communication in Chapter 15, Chapter 17, and many of the examples in later chapters.

14.2. Nonblocking I/O

In Section 10.5, we said that system calls are divided into two categories: the “slow” ones and all the others. The slow system calls are those that can block forever. They include

• Reads that can block the caller forever if data isn’t present with certain file types (pipes, terminal devices, ...

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.
Start your free trial

You might also like

Advanced UNIX Programming, Second Edition

Advanced UNIX Programming, Second Edition

Marc J. Rochkind
What Employees Want Most in Uncertain Times

What Employees Want Most in Uncertain Times

Kristine W. Powers, Jessica B.B. Diaz

Publisher Resources

ISBN: 9780321638014Purchase bookOther