From: Fabian Grünbichler Date: Mon, 19 Oct 2020 10:12:33 +0000 (+0200) Subject: build: bump nix dependency X-Git-Tag: v0.9.2~98 X-Git-Url: https://git.proxmox.com/?p=proxmox-backup.git;a=commitdiff_plain;h=0c4c6a7b1ccd17244b5adb48773940f0372ecd7e build: bump nix dependency Signed-off-by: Fabian Grünbichler --- diff --git a/Cargo.toml b/Cargo.toml index 0afc6ca3..f40f4893 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -29,7 +29,7 @@ hyper = "0.13.6" lazy_static = "1.4" libc = "0.2" log = "0.4" -nix = "0.16" +nix = "0.19" num-traits = "0.2" once_cell = "1.3.1" openssl = "0.10" diff --git a/src/bin/proxmox_backup_client/mount.rs b/src/bin/proxmox_backup_client/mount.rs index 8d4c7133..69ab6d3f 100644 --- a/src/bin/proxmox_backup_client/mount.rs +++ b/src/bin/proxmox_backup_client/mount.rs @@ -144,7 +144,7 @@ fn mount( // Process should be deamonized. // Make sure to fork before the async runtime is instantiated to avoid troubles. let pipe = pipe()?; - match fork() { + match unsafe { fork() } { Ok(ForkResult::Parent { .. }) => { nix::unistd::close(pipe.1).unwrap(); // Blocks the parent process until we are ready to go in the child diff --git a/src/tools/daemon.rs b/src/tools/daemon.rs index 397ab991..f4f63e7f 100644 --- a/src/tools/daemon.rs +++ b/src/tools/daemon.rs @@ -101,10 +101,10 @@ impl Reloader { // Start ourselves in the background: use nix::unistd::{fork, ForkResult}; - match fork() { + match unsafe { fork() } { Ok(ForkResult::Child) => { // Double fork so systemd can supervise us without nagging... - match fork() { + match unsafe { fork() } { Ok(ForkResult::Child) => { std::mem::drop(pold); // At this point we call pre-exec helpers. We must be certain that if they fail for