Chapter 3. Error Handling and Reporting

The UNIX operating system and its associated C libraries offer a rich set of system and function library calls, respectively. Within this set of calls there are very few functions, which cannot return an error. Reasons for errors include the incorrect use of parameters, inadequate buffer sizes, missing or misnamed file system objects, or simply a lack of access to a resource. A mechanism must exist to return an error indication to the caller of the function.

This chapter examines the error reporting mechanism used by the UNIX system and library function calls. This includes a discussion of the original error reporting mechanism that was used in the past and the implementation now in use. Additionally, it ...

Get Advanced UNIX Programming 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.