-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
178 lines (112 loc) · 5.43 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
Gidday!
This is the code for the book "The Linux Programming Interface"
and this is a note from me, the author, Michael Kerrisk.
For instructions on building the programs, see the file BUILDING.
For notes on changes that have been made to the code since it was
published in the book, see the file CHANGES.
Source code licensing
=====================
All complete programs provided in this distribution are covered by
the GNU General Public License (Version 3), a copy of which is
contained in the file COPYING.gpl-v3, which should have arrived with
this tarball. The library functions (in the lib/ directory) are
covered by the GNU Lesser General Public License (Version 3); see the
file COPYING.lgpl-v3 provided with this tarball.
A note on the source code
=========================
The source code is available in two versions: "dist" and "book".
The "book" version contains the program source files as published in
the book. The source files in the "dist" version contain extra code
beyond that published in the book. The differences between the "dist"
and "book" versions are as follows:
a) The "dist" versions of some programs contain extra comments.
These additional comments were stripped out of the printed version
to make the published versions of the programs shorter. (The book
itself contains text describing the operation of the programs.)
b) In a few cases, some changes have been incorporated into the
"dist" versions to make it possible to compile programs on UNIX
implementations other than Linux, so that you can try them out
on other implementations if you wish. Where necessary, the
additional code is conditionally compiled using the following
platform-specific macros:
__linux__ Defined on Linux
__sun Defined on Solaris
__FreeBSD__ Defined on FreeBSD
__NetBSD__ Defined on NetBSD
__OpenBSD__ Defined on OpenBSD
__APPLE__ Defined on Mac OS X
__hpux Defined on HP-UX
__osf__ Defined on Tru64 UNIX (formerly DEC OSF1)
__sgi Defined on Irix
_AIX Defined on AIX
c) In the "dist" version, some programs have extra functionality beyond
that in the "book" versions. Where this is significant, comments in
the programs explain the differences.
Subdirectories
==============
Under the 'tlpi' directory are a number of subdirectories. Each
subdirectory corresponds to one or more chapters of the book.
The following paragraphs give brief notes on the contents of
each subdirectory.
Note that in some cases, files are (hard) linked to appear in more than
one directory. This is particularly the case for each of the files in
the 'lib' directory, most of which are also linked in the directory
of the chapter relating to that file.
Directory Files for Chapter...
lib This contains library routines used by other
programs. The tlpi_hdr.h and error_functions.*
files are located here.
progconc 3 (System Programming Concepts)
fileio 4 and 5 (File I/O)
proc 6 (Processes)
memalloc 7 (Memory Allocation)
users_groups 8 (Users and Groups)
proccred 9 (Process Credentials)
time 10 (Time)
syslim 11 (System Limits and Options)
sysinfo 12 (System and Process Information)
filebuff 13 (File I/O Buffering)
filesys 14 (File Systems)
files 15 (File Attributes)
xattr 16 (Extended Attributes)
acl 17 (Access Control Lists)
dirs_links 18 (Directories and Links)
inotify 19 (Monitoring File Events)
signals 20 to 22 (Signals)
timers 23 (Timers and Sleeping)
procexec 24 (Process Creation), 25 (Process Termination),
26 (Monitoring Child Processes), 27 (Program Execution),
and 28 (Further Details on Process Creation and Program
Execution)
threads 29 to 33 (POSIX Threads)
pgsjc 34 (Process Groups, Sessions, and Job Control)
procpri 35 (Process Priorities and Scheduling)
procres 36 (Process Resources)
daemons 37 (Daemons)
cap 39 (Capabilities)
loginacct 40 (Login Accounting)
shlibs 41 and 42 (Shared Libraries)
pipes 44 (Pipes and FIFOs)
svipc 45 (System V IPC)
svmsg 46 (System V Message Queues)
svsem 47 (System V Semaphores)
svshm 48 (System V Shared Memory)
mmap 49 (Memory Mappings)
vmem 50 (Virtual Memory Operations)
pmsg 52 (POSIX Message Queues)
psem 53 (POSIX Semaphores)
pshm 54 (POSIX Shared Memory)
filelock 55 (File Locking)
sockets 56 to 61 (Sockets and Network Programming)
tty 62 (Terminals)
altio 63 (Alternative I/O Models)
pty 64 (Pseudoterminals)
getopt Appendix B: Parsing Command-Line Options
In addition, the following supplementary code is included (relating
to topics NOT covered in TLPI):
namespaces Code examples for namespaces, mainly related to my LWN.net
article series starting at https://lwn.net/Articles/531114/
seccomp Code examples demonstrating the use of the seccomp
(Secure Computing) facility.
vdso Some example code relating to the VDSO (Virtual Dynamic
Shared Object); see vdso(7)