Struct zircon_object::task::Job [−][src]
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:
- a reference to a parent job
- a set of child jobs (each of whom has this job as parent)
- a set of member processes
- a set of policies
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]
&self,
options: SetPolicyOptions,
policies: &[BasicPolicy]
) -> ZxResult
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]
fn id(&self) -> KoID
[src]
fn type_name(&self) -> &str
[src]
fn name(&self) -> String
[src]
fn set_name(&self, name: &str)
[src]
fn signal(&self) -> Signal
[src]
fn signal_set(&self, signal: Signal)
[src]
fn signal_clear(&self, signal: Signal)
[src]
fn signal_change(&self, clear: Signal, set: Signal)
[src]
fn add_signal_callback(&self, callback: SignalHandler)
[src]
fn get_child(&self, id: KoID) -> ZxResult<Arc<dyn KernelObject>>
[src]
fn related_koid(&self) -> KoID
[src]
fn peer(&self) -> ZxResult<Arc<dyn KernelObject>>
[src]
fn allowed_signals(&self) -> Signal
[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.
fn suspend(&self)
[src]
fn resume(&self)
[src]
fn exceptionate(&self) -> Arc<Exceptionate>
[src]
fn debug_exceptionate(&self) -> Arc<Exceptionate>
[src]
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Downcast for T where
T: Any,
[src]
T: Any,
pub fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
[src]
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
[src]
pub fn as_any(&self) -> &(dyn Any + 'static)
[src]
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
[src]
impl<T> DowncastSync for T where
T: Send + Sync + Any,
[src]
T: Send + Sync + Any,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,