Allow exec, emulate clone by pretending to be child
This commit is contained in:
parent
2fffe3ee77
commit
f0431f4de1
6 changed files with 33 additions and 13 deletions
|
@ -125,8 +125,8 @@ pub fn dup(fd: usize) -> Result<usize> {
|
|||
unsafe { syscall1(SYS_DUP, fd) }
|
||||
}
|
||||
|
||||
pub unsafe fn execve(path: *const u8, args: *const *const u8) -> Result<usize> {
|
||||
syscall2(SYS_EXECVE, path as usize, args as usize)
|
||||
pub fn execve(path: &str) -> Result<usize> {
|
||||
unsafe { syscall2(SYS_EXECVE, path.as_ptr() as usize, path.len()) }
|
||||
}
|
||||
|
||||
pub fn exit(status: usize) -> Result<usize> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue