pub struct Process {
pid_handle: PidHandle,
state: Mutex<ProcessState>,
event_bus: Arc<Mutex<EventBus>>,
}
Fields§
§pid_handle: PidHandle
§state: Mutex<ProcessState>
§event_bus: Arc<Mutex<EventBus>>
Implementations§
source§impl Process
impl Process
sourcepub fn new(bin_name: &str) -> Arc<Self>
pub fn new(bin_name: &str) -> Arc<Self>
Creates a process with a main thread that runs a specific executable file.
sourcepub fn fork(self: &Arc<Self>) -> Arc<Self>
pub fn fork(self: &Arc<Self>) -> Arc<Self>
Forks the current process and create a new child process.
sourcepub fn exec(self: &Arc<Self>, bin_name: &str, _argument_list: Vec<String>)
pub fn exec(self: &Arc<Self>, bin_name: &str, _argument_list: Vec<String>)
Replaces the current process with a new process loaded from the executable file with a given name.