pub fn create_process_without_parent(
        kernel: &Arc<Kernel>,
        initial_name: CString,
        root_fs: Arc<FsContext>,
    ) -> Result<CurrentTask, Errno> {
        let mut pids = kernel.pids.write();
        let pid = pids.allocate_pid();

        let (thread, thread_group, mm) = create_zircon_process(kernel, pid, &initial_name)?;

        let task = Self::new(
            pid,
            initial_name,
            Vec::new(),
            thread_group,
            1,
            thread,
            FdTable::new(),
            mm,
            root_fs,
            SignalActions::default(),
            Credentials::default(),
            Arc::clone(&kernel.default_abstract_socket_namespace),
            ShellJobControl { sid: pid, pgrp: pid },
            None,
        );

        pids.add_task(&task.task);
        pids.add_thread_group(&task.thread_group);
        Ok(task)
    }
/// Create a task that is the leader of a new thread group.
///
/// This function creates an underlying Zircon process to host the new
/// task.
Create a task that is the leader of a new thread group.
This function creates an underlying Zircon process to host the new
task.
Create a task that is the leader of a new thread group . This function creates an underlying Zircon process to host the new task .
pub fn create_process_without_parent(
        kernel: &Arc<Kernel>,
        initial_name: CString,
        root_fs: Arc<FsContext>,
    ) -> Result<CurrentTask, Errno> {
        let mut pids = kernel.pids.write();
        let pid = pids.allocate_pid();
        let (thread, thread_group, mm) = create_zircon_process(kernel, pid, &initial_name)?;
        let task = Self::new(
            pid,
            initial_name,
            Vec::new(),
            thread_group,
            1,
            thread,
            FdTable::new(),
            mm,
            root_fs,
            SignalActions::default(),
            Credentials::default(),
            Arc::clone(&kernel.default_abstract_socket_namespace),
            ShellJobControl { sid: pid, pgrp: pid },
            None,
        );
        pids.add_task(&task.task);
        pids.add_thread_group(&task.thread_group);
        Ok(task)
    }
pub fn create_process_without_parent ( kernel : & Arc < Kernel > , initial_name : CString , root_fs : Arc < FsContext > , ) -> Result < CurrentTask , Errno > { let mut pids = kernel . pids . write ( ) ; let pid = pids . allocate_pid ( ) ; let ( thread , thread_group , mm ) = create_zircon_process ( kernel , pid , & initial_name ) ? ; let task = Self :: new ( pid , initial_name , Vec :: new ( ) , thread_group , 1 , thread , FdTable :: new ( ) , mm , root_fs , SignalActions :: default ( ) , Credentials :: default ( ) , Arc :: clone ( & kernel . default_abstract_socket_namespace ) , ShellJobControl { sid : pid , pgrp : pid } , None , ) ; pids . add_task ( & task . task ) ; pids . add_thread_group ( & task . thread_group ) ; Ok ( task ) }
Create a task that is the leader of a new thread group.
Create a task that is the leader of a new thread group .
kernel
&Arc<Kernel>
initial_name
CString
root_fs
Arc<FsContext>
kernel
&Arc<Kernel>
initial_name
CString
root_fs
Arc<FsContext>