pub fn sys_job_create(
        &self,
        parent: HandleValue,
        options: u32,
        mut out: UserOutPtr<HandleValue>,
    ) -> ZxResult {
        info!(
            "job.create: parent={:#x}, options={:#x}, out={:#x?}",
            parent, options, out
        );
        if options != 0 {
            Err(ZxError::INVALID_ARGS)
        } else {
            let proc = self.thread.proc();
            let parent_job = proc
                .get_object_with_rights::<Job>(parent, Rights::MANAGE_JOB)
                .or_else(|_| proc.get_object_with_rights::<Job>(parent, Rights::WRITE))?;
            let child = parent_job.create_child()?;
            out.write(proc.add_handle(Handle::new(child, Rights::DEFAULT_JOB)))?;
            Ok(())
        }
    }
/// Create a new child job object given a parent job.
Create a new child job object given a parent job.
Create a new child job object given a parent job .
pub fn sys_job_create(
        &self,
        parent: HandleValue,
        options: u32,
        mut out: UserOutPtr<HandleValue>,
    ) -> ZxResult {
        info!(
            "job.create: parent={:#x}, options={:#x}, out={:#x?}",
            parent, options, out
        );
        if options != 0 {
            Err(ZxError::INVALID_ARGS)
        } else {
            let proc = self.thread.proc();
            let parent_job = proc
                .get_object_with_rights::<Job>(parent, Rights::MANAGE_JOB)
                .or_else(|_| proc.get_object_with_rights::<Job>(parent, Rights::WRITE))?;
            let child = parent_job.create_child()?;
            out.write(proc.add_handle(Handle::new(child, Rights::DEFAULT_JOB)))?;
            Ok(())
        }
    }
pub fn sys_job_create ( & self , parent : HandleValue , options : u32 , mut out : UserOutPtr < HandleValue > , ) -> ZxResult { info ! ( " " parent options out ) ; if options != 0 { Err ( ZxError :: INVALID_ARGS ) } else { let proc = self . thread . proc ( ) ; let parent_job = proc . get_object_with_rights :: < Job > ( parent , Rights :: MANAGE_JOB ) . or_else ( | _ | proc . get_object_with_rights :: < Job > ( parent , Rights :: WRITE ) ) ? ; let child = parent_job . create_child ( ) ? ; out . write ( proc . add_handle ( Handle :: new ( child , Rights :: DEFAULT_JOB ) ) ) ? ; Ok ( ( ) ) } }
Create a new child job object given a parent job.
Create a new child job object given a parent job .
&self
parent
HandleValue
options
u32
out
UserOutPtr<HandleValue>
&self
parent
HandleValue
options
u32
out
UserOutPtr<HandleValue>