update to nix 0.16

This commit is contained in:
Dietmar Maurer 2019-12-19 09:29:44 +01:00
parent 769f8c9998
commit 8bf4559b4e
2 changed files with 2 additions and 1 deletions

View File

@ -23,7 +23,7 @@ lazy_static = "1.3"
libc = "0.2" libc = "0.2"
log = "0.4" log = "0.4"
native-tls = "0.2" native-tls = "0.2"
nix = "0.15" nix = "0.16"
openssl = "0.10" openssl = "0.10"
pam = "0.7" pam = "0.7"
pam-sys = "0.5" pam-sys = "0.5"

View File

@ -165,6 +165,7 @@ impl Reloader {
fn do_exec(self, exe: CString, args: Vec<CString>) -> Result<(), Error> { fn do_exec(self, exe: CString, args: Vec<CString>) -> Result<(), Error> {
self.pre_exec()?; self.pre_exec()?;
nix::unistd::setsid()?; nix::unistd::setsid()?;
let args: Vec<&std::ffi::CStr> = args.iter().map(|s| s.as_ref()).collect();
nix::unistd::execvp(&exe, &args)?; nix::unistd::execvp(&exe, &args)?;
Ok(()) Ok(())
} }