第一节 环境
参考 <unix环境高级编程>
vim,gcc,gdb
第二节 文件IO
文件描述符
open/openat
creat
close
lseek
read
write
dup/dup2
sync/fsync/fdatasync
fcntl
ioctl
/dev/fd
第三节 文件系统
stat/fstat/fstatat/lstat
文件类型:普通文件,目录文件,块特殊文件,字符特殊文件,命名管道,套接字,符号链接
文件访问权限
access/faccessat
umask
chmod/fchmod/fchmodat
粘着位S_ISVTX
chown/fchown/fchownat/lchown
文件空洞
truncate/ftruncate
i节点
link/linkat/unlink/unlinkat/remove
rename/renameat
符号链接/硬链接
symlink/symlinkat
文件时间futimens/utimensat/utimes
opendir/fdopendir
readdir
rewinddir
closedir
telldir
seekdir
mkdir/mkdirat
rmdir
chdir/fchdir/getcwd
第四节 系统文件
/etc/passwd
getpwuid
getpwnam
getpwent/setpwent/endpwent
/etc/shdow
getspnam/getspent/setspent/endspent
组文件/etc/group
getgrgid/getgrnam
getgrent/setgrent/endgrent
getgroups/setgroups/initgroups
/etc/services
getservbyname/getservbyport
/etc/protocols
getprotobyname/getprotobynumber
/etc/networks
getnetbyname/getnetbyaddr
/etc/host
getnameinfo/getaddrinfo
登陆账号记录/var/run/utmp
系统标识
uname
gethostname
日期和时间
time
clock_gettime
clock_getres
clock_settime
gettimeofday
gmtime
localtime
mktime
strftime
strftime_l
第五节 进程控制
exit/_Exit/_exit
atexit
exec/execl/execv/execle/execve/execvp/fexecve
环境表
共享库
real name/so name/link name
malloc/calloc/realloc/free
malloc库:libmalloc,vmallic,quick-fit,jemalloc,TCMalloc,alloca
环境变量
getenv/putenv/setenv/unsetenv/clearenv
setjmp/longjmp
getrlimit/setrlimit
getpid/getppid
getuid/geteuid
getgid/getegid
fork
父进程表项,文件表,v节点表
vfork
wait/waitpid/waittid
wait3/wait4
setuid/setgid
setreuid/setregid
seteuid/setegid
system
进程会计acct
用户标识getlogin
进程调度nice
getpriority/setpriority
进程时间times
第六节 进程关系
进程组
getpgrp/getpgid
setpgid
会话
setsid/getsid
前台进程组tcgetpgrp/tcsetpgrp
作业控制
孤儿进程组
第七节 信号
信号处理:忽略、捕捉、系统默认
常见信号:SIGABRT,SIGALRM,SIGCHLD,SIGFPE,SIGINT,SIGIO,SIGKILL,SIGUSR1
函数signal
kill命令发送信号,不是杀死
中断
第八节 线程
第九节 线程控制
第十节 守护进程
第十一节 高级异步IO
select
poll
epoll
第十二节 进程间通信
管道
消息队列
信号量
共享存储