⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 wait.3

📁 linux下qmail的源码 本人加了一些注释
💻 3
字号:
.TH wait 3.SH NAMEwait \- check child process status.SH SYNTAX.B #include <wait.h>int \fBwait_nohang\fP(&\fIwstat\fR);.brint \fBwait_stop\fP(&\fIwstat\fR);.brint \fBwait_stopnohang\fP(&\fIwstat\fR);.brint \fBwait_pid\fP(&\fIwstat\fR,\fIpid\fR);int \fBwait_exitcode\fP(\fIwstat\fR);.brint \fBwait_crashed\fP(\fIwstat\fR);.brint \fBwait_stopped\fP(\fIwstat\fR);.brint \fBwait_stopsig\fP(\fIwstat\fR);int \fIpid\fR;.brint \fIwstat\fR;.SH DESCRIPTION.B wait_nohanglooks for zombies (child processes that have exited).If it sees a zombie,it eliminates the zombie,puts the zombie's exit status into.IR wstat ,and returns the zombie's process ID.If there are several zombies,.B wait_nohangpicks one.If there are children but no zombies,.B wait_nohangreturns 0.If there are no children,.B wait_nohangreturns -1,setting.B errnoappropriately..B wait_stopnohangis similar to.BR wait_nohang ,but it also looks for children that have stopped..B wait_stopis similar to.BR wait_stopnohang ,but if there are children it will pause waiting for one of themto stop or exit..B wait_pidwaits for child process.I pidto exit.It eliminates any zombie that shows up in the meantime,discarding the exit status..B wait_stopand.B wait_pidretry upon.BR error_intr ..SH "STATUS PARSING"If the child stopped,.B wait_stoppedis nonzero;.B wait_stopsigis the signal that caused the child to stop.If the child exited by crashing,.B wait_stoppedis zero;.B wait_crashedis nonzero.If the child exited normally,.B wait_stoppedis zero;.B wait_crashedis zero;and.B wait_exitcodeis the child's exit code..SH "SEE ALSO"wait(2),error(3)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -