diff --git a/Cargo.lock b/Cargo.lock index 7f18a23034..966a233d6d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,13 +2,13 @@ name = "init" version = "0.1.0" dependencies = [ - "redox_syscall 0.1.30 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.31 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "redox_syscall" -version = "0.1.30" +version = "0.1.31" source = "registry+https://github.com/rust-lang/crates.io-index" [metadata] -"checksum redox_syscall 0.1.30 (registry+https://github.com/rust-lang/crates.io-index)" = "8312fba776a49cf390b7b62f3135f9b294d8617f7a7592cfd0ac2492b658cd7b" +"checksum redox_syscall 0.1.31 (registry+https://github.com/rust-lang/crates.io-index)" = "8dde11f18c108289bef24469638a04dce49da56084f2d50618b226e47eb04509" diff --git a/src/main.rs b/src/main.rs index 980f95f636..745d16f57a 100644 --- a/src/main.rs +++ b/src/main.rs @@ -141,6 +141,8 @@ pub fn main() { println!("init: failed to run initfs:etc/init.rc: {}", err); } + syscall::setrens(0, 0).expect("init: failed to enter null namespace"); + loop { let mut status = 0; syscall::waitpid(0, &mut status, 0).unwrap();