From f10c35e964c74a9b60df8cd03ef084f6a47c53e6 Mon Sep 17 00:00:00 2001 From: Antoine Poinsot Date: Mon, 13 Feb 2023 10:56:22 +0100 Subject: [PATCH] daemonize: switch the pid and log file arguments The caller and the definition had them swapped.. So it was logging to the PID file and writing the PID to the log file.. --- src/daemonize.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/daemonize.rs b/src/daemonize.rs index 0ce62afe..3feeac8b 100644 --- a/src/daemonize.rs +++ b/src/daemonize.rs @@ -10,8 +10,8 @@ use std::path::Path; // MIT licensed according to https://github.com/jedisct1/rust-daemonize-simple/blob/master/Cargo.toml pub unsafe fn daemonize( chdir: &Path, - pid_file: &Path, log_file: &Path, + pid_file: &Path, ) -> Result<(), &'static str> { match libc::fork() { -1 => return Err("fork() failed"),