- 论坛徽章:
- 4
|
本帖最后由 井蛙夏虫 于 2013-12-16 20:42 编辑
回复 5# socay2
这个是posix标准文档。
我的系统上的man文档是有说的,不知道为什么你系统的没有。- The wait() system call suspends execution of the calling process until one of its children terminates. The call wait(&status) is equivalent to:
- waitpid(-1, &status, 0);
复制代码 wait只能是子进程终止。如果要子进程继续和暂停都可以,要用waitpid- The waitpid() system call suspends execution of the calling process until a child specified by pid argument has changed state. By default, waitpid() waits only for terminated children, but this
- behavior is modifiable via the options argument, as described below.
复制代码- The value of options is an OR of zero or more of the following constants:
- WNOHANG return immediately if no child has exited.
- WUNTRACED also return if a child has stopped (but not traced via ptrace(2)). Status for traced children which have stopped is provided even if this option is not specified.
- WCONTINUED (since Linux 2.6.10)
- also return if a stopped child has been resumed by delivery of SIGCONT.
复制代码 |
|