Linux useful system calls and Library functions - PowerPoint PPT Presentation

About This Presentation
Title:

Linux useful system calls and Library functions

Description:

Inter-process Communications in Linux: The Nooks & Crannies, by John Shapley ... If needed, additional text can be appended to the string returned by strerror. ... – PowerPoint PPT presentation

Number of Views:359
Avg rating:3.0/5.0
Slides: 157
Provided by: Sae55
Category:

less

Transcript and Presenter's Notes

Title: Linux useful system calls and Library functions


1

Linux useful system calls and Library
functions Selected from Chapters 1 to 5 from the
book Inter-process Communications in Linux The
Nooks Crannies, by John Shapley Gray, Prentice
Hall, 2003
2
Linux useful system calls and Library functions
3

Programs and Processes
Chapter 1
4
Managing Failures
PROGRAMS AND PROCESSES
Figure 1.5. Explanation of the summary table
format.
5
Managing Failures
PROGRAMS AND PROCESSES
6
Managing Failures
PROGRAMS AND PROCESSES
Table 1.2. Summary of the strerror Library
Function.
7
Managing Failures
PROGRAMS AND PROCESSES
8
Creating a Process
PROGRAMS AND PROCESSES
9
Creating a Process
PROGRAMS AND PROCESSES
Table 1.3. Summary of the fork System Call.
10
Creating a Process
PROGRAMS AND PROCESSES
11
Creating a Process
PROGRAMS AND PROCESSES
Table 1.4. fork Error Messages.
12

Processing Environment
Chapter 2
13
Process ID
PROCESSING ENVIRONMENT
Table 2.1. Summary of the getpid System Call.
14
Process ID
PROCESSING ENVIRONMENT
15
Parent Process ID
PROCESSING ENVIRONMENT
16
Process ID
PROCESSING ENVIRONMENT
Table 2.2. Summary of the getppid System Call.
17
Parent Process ID
PROCESSING ENVIRONMENT
18
Process Group ID
PROCESSING ENVIRONMENT
19
Process Group ID
PROCESSING ENVIRONMENT
Table 2.3. Summary of the getpgid System Call.
20
Process Group ID
PROCESSING ENVIRONMENT
21
Process Group ID
PROCESSING ENVIRONMENT
Table 2.4. getpgid Error Messages.
22
Process Group ID
PROCESSING ENVIRONMENT
23
Process Group ID
PROCESSING ENVIRONMENT
Table 2.5. Summary of the setpgid System Call.
24
Process Group ID
PROCESSING ENVIRONMENT
25
Process Group ID
PROCESSING ENVIRONMENT
26
Process Group ID
PROCESSING ENVIRONMENT
. Table 2.6. setpgid Error Messages
27
Real and Effective User and Group IDs
PROCESSING ENVIRONMENT
28
Real and Effective User and Group IDs
PROCESSING ENVIRONMENT
Table 2.7. Summary of User/Group Real and
Effective ID Calls System.
29
File Information
PROCESSING ENVIRONMENT
30
File Information
PROCESSING ENVIRONMENT
Table 2.8. Summary of the stat System Calls.
31
File Information
PROCESSING ENVIRONMENT
32
File Information
PROCESSING ENVIRONMENT
33
File Information
PROCESSING ENVIRONMENT
. Table 2.9. stat Error Messages
34
File Information
PROCESSING ENVIRONMENT
. Table 2.9. stat Error Messages
35
File Information
PROCESSING ENVIRONMENT
36
File Information
PROCESSING ENVIRONMENT
Table 2.10. Summary of the chmod/fchmod System
Calls.
37
File Information
PROCESSING ENVIRONMENT
38
File Information
PROCESSING ENVIRONMENT
39
File Information
PROCESSING ENVIRONMENT
. Table 2.11. chmod/fchmod Error Messages
40
File Information
PROCESSING ENVIRONMENT
. Table 2.11. chmod/fchmod Error Messages
41
File Information
PROCESSING ENVIRONMENT
. Table 2.11. chmod/fchmod Error Messages
42
File Information
PROCESSING ENVIRONMENT
43
File Information
PROCESSING ENVIRONMENT
Table 2.12. Summary of the umask System Call.
44
File Information
PROCESSING ENVIRONMENT
45
File Information
PROCESSING ENVIRONMENT
Table 2.13. Summary of the getcwd Library
Function.
46
File Information
PROCESSING ENVIRONMENT
47
File Information
PROCESSING ENVIRONMENT
. Table 2.14. getcwd Error Messages
48
File Information
PROCESSING ENVIRONMENT
49
File Information
PROCESSING ENVIRONMENT
Table 2.15. Summary of the chdir/fchdir System
Calls
50
File Information
PROCESSING ENVIRONMENT
51
File Information
PROCESSING ENVIRONMENT
. Table 2.16. chdir/fchdir Error Messages
52
File Information
PROCESSING ENVIRONMENT
Table 2.16. chdir/fchdir Error Messages.
53
Process Resource Limits
PROCESSING ENVIRONMENT
54
Process Resource Limits
PROCESSING ENVIRONMENT
Table 2.17. Summary of the ulimit System Call.
55
Process Resource Limits
PROCESSING ENVIRONMENT
56
Process Resource Limits
PROCESSING ENVIRONMENT
57
Process Resource Limits
PROCESSING ENVIRONMENT
.Table 2.18. ulimit Error Messages
58
Process Resource Limits
PROCESSING ENVIRONMENT
59
Process Resource Limits
PROCESSING ENVIRONMENT
Table 2.19. Summary of the getrlimit/setrlimit
System Calls.
60
Process Resource Limits
PROCESSING ENVIRONMENT
61
Process Resource Limits
PROCESSING ENVIRONMENT
. Table 2.20. getrlimit/setrlimit Error Messages
62
Process Resource Limits
PROCESSING ENVIRONMENT
63
Process Resource Limits
PROCESSING ENVIRONMENT
Table 2.21. Summary of the sysconf Library
Function.
64
Process Resource Limits
PROCESSING ENVIRONMENT
65
Command-Line Values
PROCESSING ENVIRONMENT
Table 2.22. Summary of the getopt Library
Function.
66
Command-Line Values
PROCESSING ENVIRONMENT
67
Environment Variables
PROCESSING ENVIRONMENT
68
Environment Variables
PROCESSING ENVIRONMENT
Table 2.23. Summary of the getenv Library
Function.
69
Environment Variables
PROCESSING ENVIRONMENT
Table 2.24. Summary of the putenv Library
Function.
70
The /proc Filesystem
PROCESSING ENVIRONMENT
71
The /proc Filesystem
PROCESSING ENVIRONMENT
Table 2.25. Summary of the readlinkSystem Call.
72
The /proc Filesystem
PROCESSING ENVIRONMENT
73
The /proc Filesystem
PROCESSING ENVIRONMENT
. Table 2.26. readlink Error Messages
74
The /proc Filesystem
PROCESSING ENVIRONMENT
Table 2.26. readlink Error Messages.
75

Using Processes
Chapter 3
76
execlp
USING PROCESSES
77
execlp
USING PROCESSES
Table 3.3. Summary of the execlp Library Function.
78
execlp
USING PROCESSES
79
execlp
USING PROCESSES
. Table 3.4. exec Error Messages
80
execlp
USING PROCESSES
. Table 3.4. exec Error Messages
81
execlp
USING PROCESSES
. Table 3.4. exec Error Messages
82
execlp
USING PROCESSES
. Table 3.4. exec Error Messages
83
execvp
USING PROCESSES
84
execvp
USING PROCESSES
Table 3.5. Summary of the execvp System Call.
85
execvp
USING PROCESSES
86
execvp
USING PROCESSES
87
Ending a Process
USING PROCESSES
88
Ending a Process
USING PROCESSES
Table 3.6. Summary of the exit Library Function.
89
Ending a Process
USING PROCESSES
90
Ending a Process
USING PROCESSES
91
Ending a Process
USING PROCESSES
Table 3.7. Summary of the atexit Library Function.
92
Ending a Process
USING PROCESSES
93
Ending a Process
USING PROCESSES
Table 3.8. Summary of the _exit System Call.
94
Ending a Process
USING PROCESSES
95
Ending a Process
USING PROCESSES
96
Ending a Process
USING PROCESSES
97
Waiting on Processes
USING PROCESSES
98
Waiting on Processes
USING PROCESSES
Table 3.9. Summary of the wait System Call.
99
Waiting on Processes
USING PROCESSES
100
Waiting on Processes
USING PROCESSES
101
Waiting on Processes
USING PROCESSES
102
Waiting on Processes
USING PROCESSES
Table 3.11. Summary of the waitpid System Call.
103
Waiting on Processes
USING PROCESSES
104
Waiting on Processes
USING PROCESSES
. Table 3.12. Interpretation of pid Values by
waitpid
105
Waiting on Processes
USING PROCESSES
106
Waiting on Processes
USING PROCESSES
. Table 3.13. Flag Values for waitpid
107
Waiting on Processes
USING PROCESSES
108
Waiting on Processes
USING PROCESSES
. Table 3.14. waitpid Error Messages
109
Waiting on Processes
USING PROCESSES
110
Waiting on Processes
USING PROCESSES
Table 3.15. Summary of the wait3/wait4 Library
Functions.
111
Waiting on Processes
USING PROCESSES
112
Waiting on Processes
USING PROCESSES
113
Waiting on Processes
USING PROCESSES
. Table 3.16. Option Flag Values for wait3/wait4
114
Waiting on Processes
USING PROCESSES
115
Waiting on Processes
USING PROCESSES
. Table 3.17. wait3/wait4 Error Messages
116

Primitive Communications
Chapter 4
117
Lock Files
PRIMITIVE COMMUNICATIONS
Table 4.1. Summary of the creat System Call.
118
Lock Files
PRIMITIVE COMMUNICATIONS
. Table 4.2. creat Error Messages
119
Lock Files
PRIMITIVE COMMUNICATIONS
. Table 4.2. creat Error Messages
120
Lock Files
PRIMITIVE COMMUNICATIONS
. Table 4.2. creat Error Messages
121
Lock Files
PRIMITIVE COMMUNICATIONS
Table 4.3. Summary of the sleep Library Function.
122
Lock Files
PRIMITIVE COMMUNICATIONS
Table 4.4. Summary of the unlink System Call.
123
Lock Files
PRIMITIVE COMMUNICATIONS
. Table 4.5. unlink error messages
124
Lock Files
PRIMITIVE COMMUNICATIONS
. Table 4.5. unlink error messages
125
Lock Files
PRIMITIVE COMMUNICATIONS
. Table 4.5. unlink error messages
126
Locking Files
PRIMITIVE COMMUNICATIONS
Table 4.6. Summary of the fcntl System Call.
127
Locking Files
PRIMITIVE COMMUNICATIONS
.Table 4.7. Lock-Specific Defined Constants Used
with the fcntl System Call
128
Locking Files
PRIMITIVE COMMUNICATIONS
. Table 4.8. Defined Constants Used in the flock
l_type Member
129
Locking Files
PRIMITIVE COMMUNICATIONS
. Table 4.9. fcntl Error Messages Relating to
Locking
130
Locking Files
PRIMITIVE COMMUNICATIONS
. Table 4.9. fcntl Error Messages Relating to
Locking
131
Locking Files
PRIMITIVE COMMUNICATIONS
Table 4.10. Summary of the lockf Library Call
132
Locking Files
PRIMITIVE COMMUNICATIONS
. Table 4.11. Defined cmd Constants
133
Locking Files
PRIMITIVE COMMUNICATIONS
. Table 4.12. lockf error messages
134
More About Signals
PRIMITIVE COMMUNICATIONS
Table 4.14. Summary of the kill System Call.
135
More About Signals
PRIMITIVE COMMUNICATIONS
. Table 4.15. Interpretation of pid values by the
kill System Call
136
More About Signals
PRIMITIVE COMMUNICATIONS
. Table 4.16. kill Error Messages
137
More About Signals
PRIMITIVE COMMUNICATIONS
Table 4.17. Summary of the alarm System Call.
138
More About Signals
PRIMITIVE COMMUNICATIONS
Table 4.18. Summary of the pause Library Function.
139
Signal and Signal Management Calls
PRIMITIVE COMMUNICATIONS
Table 4.19. Summary of the signal System Call.
140
Signal and Signal Management Calls
PRIMITIVE COMMUNICATIONS
Table 4.20. Summary of the sigaction System Call.
141
Signal and Signal Management Calls
PRIMITIVE COMMUNICATIONS
Table 4.21. Summary of the isatty Library
Function.
142
Signal and Signal Management Calls
PRIMITIVE COMMUNICATIONS
. Table 4.22. sa_flags Constants
143
Signal and Signal Management Calls
PRIMITIVE COMMUNICATIONS
Table 4.23. Summary of the sigprocmask,
sigpending, and sigsuspend System Call.
144
Signal and Signal Management Calls
PRIMITIVE COMMUNICATIONS
. Table 4.24. sigprocmask, sigpending, and
sigsuspend Error Message
145
Signal and Signal Management Calls
PRIMITIVE COMMUNICATIONS
. Table 4.25. Defined how Constants
146

Pipes
Chapter 5
147
Introduction
PIPES
Table 5.1. Summary of the write System Call.
148
Introduction
PIPES
Table 5.3. Summary of the read System Call.
149
Unnamed Pipes
PIPES
Table 5.5. Summary of the pipe System Call.
150
Unnamed Pipes
PIPES
Table 5.7. Summary of the dup System Call.
151
Unnamed Pipes
PIPES
Table 5.8. Summary of the dup2 System Call.
152
Unnamed Pipes
PIPES
Table 5.10. Summary of the popen Library Function.
153
Unnamed Pipes
PIPES
Table 5.11. Summary of the pclose Library
Function.
154
Unnamed Pipes
  • Exp 5.1 See the example of using unnamed pipes
    with read and write calls
  • Exp 5.2 See the example of using unnamed pipes
    with dup2 system call

155
Named Pipes
PIPES
Table 5.12. Summary of the mknod System Call.
156
Named Pipes
PIPES
Table 5.15. Summary of the mkfifo Library
Function.
Write a Comment
User Comments (0)
About PowerShow.com