Merge #347: daemonize: switch the pid and log file arguments
f10c35e964c74a9b60df8cd03ef084f6a47c53e6 daemonize: switch the pid and log file arguments (Antoine Poinsot)
Pull request description:
The caller and the definition had them swapped.. So it was logging to the PID file and writing the PID to the log file..
ACKs for top commit:
darosior:
self-ACK f10c35e964c74a9b60df8cd03ef084f6a47c53e6 -- trivial
Tree-SHA512: dc8be2ceedcb05a5eec444ff31b96053742537a86342fe9133aa4df354bb02ca70b7db633152b3f3a6cdeb7b63455d04fce6323c53b93f7365f89a8b4f2d0574
This commit is contained in:
commit
f7490614ae
@ -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"),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user