您的位置:首页 > 大数据 > 人工智能

wait3和wait4 Functions

2016-02-29 20:44 330 查看
提供了与wait,waitpid,waitid函数唯一不能提供的特性:增加了额外的参数,用于存放中止进程的所有资源的汇总和其所有的子进程

wait3, wait4 - wait for process to change state, BSD style

#include <sys/types.h>
#include <sys/time.h>
#include <sys/resource.h>
#include <sys/wait.h>

pid_t wait3(int *status, int options, struct rusage *rusage);

pid_t wait4(pid_t pid, int *status, int options, struct rusage *rusage);
//Return: process ID if OK, -1 on error


包含了资源信息

the amount of user CPU time

the amount of system CPU time

number of page faults

number of signal received

可以
man getrusage manual
查看详细的额外信息

single UNIX specification 版本3已经移除了wait3

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: