Create a new job.


#include <zircon/syscalls.h>

zx_status_t zx_job_create(zx_handle_t parent_job,
                          uint32_t options,
                          zx_handle_t* out);



Upon success a handle for the new job is returned.

The kernel keeps track of and restricts the "height" of a job, which is its distance from the root job. It is illegal to create a job under a parent whose height exceeds an internal "max height" value. (It is, however, legal to create a process under such a job.)



parent_job must be of type ZX_OBJ_TYPE_JOB and have ZX_RIGHT_MANAGE_JOB.




ZX_ERR_BAD_HANDLE parent_job is not a valid handle.

ZX_ERR_WRONG_TYPE parent_job is not a job handle.

ZX_ERR_INVALID_ARGS options is nonzero, or out is an invalid pointer.

ZX_ERR_ACCESS_DENIED parent_job does not have the ZX_RIGHT_WRITE or ZX_RIGHT_MANAGE_JOB right.



ZX_ERR_BAD_STATE The parent job object is in the dead state.