Struct zircon_object::task::Job[][src]

pub struct Job { /* fields omitted */ }

Control a group of processes

SYNOPSIS

A job is a group of processes and possibly other (child) jobs. Jobs are used to track privileges to perform kernel operations (i.e., make various syscalls, with various options), and track and limit basic resource (e.g., memory, CPU) consumption. Every process belongs to a single job. Jobs can also be nested, and every job except the root job also belongs to a single (parent) job.

DESCRIPTION

A job is an object consisting of the following:

Jobs control “applications” that are composed of more than one process to be controlled as a single entity.

Implementations

impl Job[src]

pub fn root() -> Arc<Self>[src]

Create the root job.

pub fn create_child(self: &Arc<Self>) -> ZxResult<Arc<Self>>[src]

Create a new child job object.

pub fn policy(&self) -> JobPolicy[src]

Get the policy of the job.

pub fn parent(&self) -> Option<Arc<Self>>[src]

Get the parent job.

pub fn set_policy_basic(
    &self,
    options: SetPolicyOptions,
    policies: &[BasicPolicy]
) -> ZxResult
[src]

Sets one or more security and/or resource policies to an empty job.

The job’s effective policies is the combination of the parent’s effective policies and the policies specified in policy.

After this call succeeds any new child process or child job will have the new effective policy applied to it.

pub fn set_policy_timer_slack(&self, policy: TimerSlackPolicy) -> ZxResult[src]

Sets timer slack policy to an empty job.

pub fn get_info(&self) -> JobInfo[src]

Get information of this job.

pub fn check_root_job(&self) -> ZxResult[src]

Check whether this job is root job.

pub fn process_ids(&self) -> Vec<KoID>[src]

Get KoIDs of Processes.

pub fn children_ids(&self) -> Vec<KoID>[src]

Get KoIDs of children Jobs.

pub fn is_empty(&self) -> bool[src]

Return true if this job has no processes and no child jobs.

Trait Implementations

impl Debug for Job[src]

impl Drop for Job[src]

impl KernelObject for Job[src]

impl Task for Job[src]

fn kill(&self)[src]

Kill the job. The job do not terminate immediately when killed. It will terminate after all its children and processes are terminated.

Auto Trait Implementations

impl !RefUnwindSafe for Job

impl Send for Job

impl Sync for Job

impl Unpin for Job

impl !UnwindSafe for Job

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Downcast for T where
    T: Any
[src]

impl<T> DowncastSync for T where
    T: Send + Sync + Any
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.