setwaitjobpid(2)
setwaitjobpid - sets a job to wait for a pid to call waitjob
As shipped in IRIX 6.5.15. Added in IRIX 6.5.15.
NAME setwaitjobpid - sets a job to wait for a pid to call 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 pid to call the function waitjob. If a job is set to wait for a pid, it remains around after job termination until either the process with the pid calls waitjob or the process terminates. The setwaitjobpid function takes two arguements: the jid of the job to be set to wait and the pid of the process that is expected to call waitjob. The pid cannot be the process calling the setwaitjobpid function. If a jid of 0 is passed in, the function will set the current job. 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] Set if pid of current process entered as an argument or jid specified is the pid's job. [ESRCH] The pid is invalid. [EPERM] If calling process or entered pid do not have capability. [ENOJOB] Set if jid is invalid. SEE ALSO systune(1M), 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.