Store context memory information

This commit is contained in:
Jeremy Soller 2016-09-11 21:04:34 -06:00
parent bed09d0518
commit bcd318d80b
5 changed files with 131 additions and 59 deletions

View file

@ -93,10 +93,7 @@ pub fn exec(path: &[u8], _args: &[[usize; 2]]) -> Result<usize> {
let _ = syscall::close(file);
match elf::Elf::from(&data) {
Ok(elf) => {
elf.run();
Ok(0)
},
Ok(elf) => elf.run().and(Ok(0)),
Err(err) => {
println!("failed to execute {}: {}", unsafe { str::from_utf8_unchecked(path) }, err);
Err(Error::NoExec)