The Linux Programming Interface
Fundamental Concepts 37 Therefore, Linux, like all modern UNIX implementations, provides a rich set of mech- anisms for interpro ...
38 Chapter 2 When a process receives a signal, it takes one of the following actions, depend- ing on the signal: z it ignores th ...
Fundamental Concepts 39 All major shells, except the Bourne shell, provide an interactive feature called job control, which allo ...
40 Chapter 2 program undergoes the usual input processing performed by the terminal driver (for example, in the default mode, a ...
Fundamental Concepts 41 The client and server may reside on the same host computer or on separate hosts connected via a network. ...
42 Chapter 2 don’t strictly qualify as realtime, most UNIX implementations now support some or all of these extensions. (During ...
SYSTEM PROGRAMMING CONCEPTS This chapter covers various topics that are prerequisites for system programming. We begin by introd ...
44 Chapter 3 new process, performing I/O, and creating a pipe for interprocess communica- tion. (The syscalls(2) manual page lis ...
System Programming Concepts 45 routine performs the required task, which may involve modifying values at addresses specified in ...
46 Chapter 3 Figure 3-1: Steps in the execution of a system call Appendix A describes the strace command, which can be used to t ...
System Programming Concepts 47 call just outputs a block of bytes. Similarly, the malloc() and free() functions perform various ...
48 Chapter 3 There are two means by which an application program can determine the version of the GNU C library present on the s ...
System Programming Concepts 49 if (close(fd) == -1) { /* Code to handle the error */ } When a system call fails, it sets the glo ...
50 Chapter 3 The string returned by strerror() may be statically allocated, which means that it could be overwritten by subseque ...
System Programming Concepts 51 Each of our example programs that has a nontrivial command-line syntax pro- vides a simple help f ...
52 Chapter 3 Listing 3-2: Declarations for common error-handling functions ––––––––––––––––––––––––––––––––––––––––––––––––––––– ...
System Programming Concepts 53 nonempty string value, by calling abort() to produce a core dump file for use with the debugger. ...
54 Chapter 3 The fatal() function is used to diagnose general errors, including errors from library functions that don’t set err ...
System Programming Concepts 55 static void outputError(Boolean useErr, int err, Boolean flushStdout, const char *format, va_list ...
56 Chapter 3 void err_exit(const char *format, ...) { va_list argList; va_start(argList, format); outputError(TRUE, errno, FALSE ...
«
1
2
3
4
5
6
7
8
9
10
»
Free download pdf