From 0c4c6a7b1ccd17244b5adb48773940f0372ecd7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= Date: Mon, 19 Oct 2020 12:12:33 +0200 Subject: [PATCH] build: bump nix dependency MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Fabian Grünbichler --- Cargo.toml | 2 +- src/bin/proxmox_backup_client/mount.rs | 2 +- src/tools/daemon.rs | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) 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