pub fn sys_job_set_critical(
        &self,
        job_handle: HandleValue,
        options: u32,
        process_handle: HandleValue,
    ) -> ZxResult {
        info!(
            "job.set_critical: job={:#x?}, options={:#x}, process={:#x?}",
            job_handle, options, process_handle,
        );
        let retcode_nonzero = if options == 1 {
            true
        } else if options == 0 {
            false
        } else {
            unimplemented!()
        };
        let proc = self.thread.proc();
        let job = proc.get_object_with_rights::<Job>(job_handle, Rights::DESTROY)?;
        let process = proc.get_object_with_rights::<Process>(process_handle, Rights::WAIT)?;
        process.set_critical_at_job(&job, retcode_nonzero)?;
        Ok(())
    }
/// Sets process as critical to job.
///
/// When process terminates, job will be terminated as if `zx_task_kill()` was called on it.
Sets process as critical to job.
When process terminates, job will be terminated as if `zx_task_kill()` was called on it.
Sets process as critical to job . When process terminates job will be terminated as if ` zx_task_kill () ` was called on it .
pub fn sys_job_set_critical(
        &self,
        job_handle: HandleValue,
        options: u32,
        process_handle: HandleValue,
    ) -> ZxResult {
        info!(
            "job.set_critical: job={:#x?}, options={:#x}, process={:#x?}",
            job_handle, options, process_handle,
        );
        let retcode_nonzero = if options == 1 {
            true
        } else if options == 0 {
            false
        } else {
            unimplemented!()
        };
        let proc = self.thread.proc();
        let job = proc.get_object_with_rights::<Job>(job_handle, Rights::DESTROY)?;
        let process = proc.get_object_with_rights::<Process>(process_handle, Rights::WAIT)?;
        process.set_critical_at_job(&job, retcode_nonzero)?;
        Ok(())
    }
pub fn sys_job_set_critical ( & self , job_handle : HandleValue , options : u32 , process_handle : HandleValue , ) -> ZxResult { info ! ( " " job_handle options process_handle ) ; let retcode_nonzero = if options == 1 { true } else if options == 0 { false } else { unimplemented ! ( ) } ; let proc = self . thread . proc ( ) ; let job = proc . get_object_with_rights :: < Job > ( job_handle , Rights :: DESTROY ) ? ; let process = proc . get_object_with_rights :: < Process > ( process_handle , Rights :: WAIT ) ? ; process . set_critical_at_job ( & job , retcode_nonzero ) ? ; Ok ( ( ) ) }
Sets process as critical to job.
Sets process as critical to job .
&self
job_handle
HandleValue
options
u32
process_handle
HandleValue
&self
job_handle
HandleValue
options
u32
process_handle
HandleValue