waitjob(2)
waitjob - gets information about a terminated job
As shipped in IRIX 6.5.15. Added in IRIX 6.5.15.
NAME waitjob - gets information about a terminated job SYNOPSIS #include <sys/resource.h> jid_t waitjob(job_info_t *jobinfo) DESCRIPTION The waitjob function obtains information about a terminated job that has been set with setwaitjobpid to wait. Only information from terminated jobs, jobs whose processes have all terminated, can be obtained. When all the processes of a job have terminated, the job remains as a zombie if a waiting pid has been specified until either the pid set to obtain the information is gone or the waitjob function called. The waitjob function does not block caller's execution. Only the process whose pid is set with setwaitjobpid can retrieve the terminated job's information. The waitjob function takes one arguement, a pointer to a job_info_t structure. The structure contains: the terminated job's job id, the job limit enforcement flag that tells what if any enforcement action was taken on that job, the job's start time, the job's uid initiator, and the job's limit information. Enforcement flags include: JL_CPU_SIGXCPU Process in job exceeded CPU time in seconds and was sent SIGXCPU. Enforcement of the JLIMIT_CPU limit. JL_CPU_SIGKILL Process in job is terminated with the SIGKILL signal. The JLIMIT_CPU limit was enforced. JL_DATA Process in job attempted to exceed the job's maximum heap size. Enforcement of the JLIMIT_DATA limit. JL_VMEM Maximum reached for job's mapped address space. The JLIMIT_VMEM limit was enforced. JL_RSS Maximum size of job's resident set size reached. The JLIMIT_RSS limit was enforced. JL_NOFILE Maximum number of open file descriptors for the job was reached. Enforcement of the JLIMIT_NOFILE occurred. JL_PTHREAD The JLIMIT_PTHREAD enforcement flag when maximum number of pthreads is reached. JL_NUMPROC Maximum number of processes in a job reached, JLIMIT_NUMPROC limit enforced. JL_PMEM Job's maximum amount of physical memory reached. The JLIMIT_PMEM limit was enforced. The waitjob function returns the terminated job's job id if successful. ERRORS Under the following conditions, the function waitjob sets errno to: [ENOPKG] The job limits software is not installed. SEE ALSO systune(1M), setwaitjobpid(2). DIAGNOSTICS Upon successful completion, waitjob returns the terminated job's job id. If an error occurs, a value of -1 is returned and errno is set to indicate the error.