makenewjob(2)makenewjob(2)NAMEmakenewjob - creates a new job
SYNOPSIS
#include <sys/resource.h>
jid_t makenewjob(jid_t rjid, uid_t user)
DESCRIPTION
The makenewjob function creates a new job container. If the rjid value is
0, the makenewjob function assigns a rjid value. If the rjid value is
not 0, the makenewjob function attempts to create a job with the
specified job ID. The uid value provided should be the uid of the user
associated with the job. The makenewjob function checks for the
CAP_SETUID 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.
When a job is first created, the system default limits are applied to the
job. The system defaults can be viewed or modified by the systune
jlimits command.
ERRORS
Under the following conditions, the function makenewjob sets errno to:
[EBUSY] The requested job ID value is in use.
[ENOPKG] The job limits software is not installed.
[EPERM] The calling process does not have the CAP_SETUID
capability.
SEE ALSOsystune(1M), killjob(2).
DIAGNOSTICS
Upon successful completion, makenewjob 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, makenewjob returns a value of 0.
Page 1