jlimit_startjob(3c)
jlimit_startjob - creates a new job container
Showing IRIX 6.5.30 (default release). Last changed in IRIX 6.5.15.
NAME jlimit_startjob - creates a new job container SYNOPSIS #include <sys/resource.h> jid_t jlimit_startjob(char *username, uid_t uid, char *domainname); DESCRIPTION The jlimit_startjob function performs all of the tasks necessary to creating a new job. The function takes the username, the user's ID (uid), and job limits domainname as arguments and returns the newly created job's job ID. A list of domains may also be passed to the jlimit_startjob function. This allows a batch scheduler to have a unique job limits domain. The example below shows a domain list for the Miser batch processing system: jid = jlimit_startjob("bsmith", 7777, "miser:batch"); The domain list is a colon-delimited list ("miser:batch"). The jlimit_startjob function starts with the first domain on the left; in this case, miser. If the miser domain does not exist, then jlimit_startjob will try batch. To create a new job, the calling process must have CAP_SETUID and CAP_PROC_MGT capability. See the capabilities(4) man page for more information on the capability mechanism that provides fine grained control over the privileges of a process. The jlimit_startjob function retrieves the job limit and process information from the ULDB and populates those limits into the job structure. SEE ALSO showlimits(1), getjlimit(2), makenewjob(2). ERRORS Under the following conditions, the function jlimit_startjob fails and set errno to: [ENOPKG] The job limits software is not installed. [EINVAL] The makenewjob(2) system call returns an invalid argument to the jlimit_startjob function. DIAGNOSTICS Upon successful completion, jlimit_startjob returns a job ID. If an error occurs, a value of -1 is returned and errno is set to indicate the error. If job limits software is not installed, jlimit_startjob returns a value of 0.