Skip to main content

exec_current

Function exec_current 

Source
pub fn exec_current(path: &str) -> isize
Expand description

Replace the current process image with a new ELF loaded from path. FD table is preserved; address space and context are rebuilt.

Current ownership contract: the scheduler/PCB stores the installed satp in ProcessContext, but it does not yet own an AddressSpace object or reclaim old user frames on exec/exit. exec_current therefore installs a fresh page-table root and documents the remaining lifecycle gap instead of pretending to provide full POSIX-style address-space replacement.