setwaitjobpid(2)
setwaitjobpid - set a process to retrieve job information with waitjob
As shipped in IRIX 6.5.19. Last changed in IRIX 6.5.19.
NAME setwaitjobpid - set a process to retrieve job information with waitjob SYNOPSIS #include <sys/resource.h> int setwaitjobpid(jid_t rjid, pid_t wpid) DESCRIPTION The setwaitjobpid function sets a job to wait for a specified process to call waitjob. If a job is set to wait for a process, it remains a zombie after job termination until either the process wpid calls waitjob or the process wpid terminates. The setwaitjobpid function takes two arguements: rjid, the job id of the job to be set to wait and wpid, the process id of the process that is expected to call waitjob. The wpid parameter cannot be the process calling the setwaitjobpid function. If an rjid of 0 is specified, the job of the calling process is used. The setwaitjobpid function checks the specified pid's process for the CAP_SETUID capability. If called for another job, the setwaitjobpid function checks for CAP_MAC_WRITE and CAP_PROC_MGT capability. See the capability(4) and capabilities(4) man pages for more information on the capability mechanism that provides fine grained control over the privileges of a process. The setwaitjobpid function returns 0 if successful. ERRORS Under the following conditions, the function setwaitjobpid sets errno to: [ENOPKG] The job limits software is not installed. [EINVAL] wpid is the pid of the calling process or rjid is the jid of the job which wpid belongs. [ESRCH] The process wpid does not exist. [EPERM] If calling process or entered pid do not have capability. [ENOJOB] The job rjid does not exist. SEE ALSO systune(1M), getjlimit(2), setjlimit(2), getjusage(2), makenewjob(2), killjob(2), waitjob(2). DIAGNOSTICS Upon successful completion, setwaitjobpid returns 0. If an error occurs, a value of -1 is returned and errno is set to indicate the error.