Skip to content

Commit

Permalink
Add the PID file name in the error message
Browse files Browse the repository at this point in the history
Rel #24
  • Loading branch information
breard-r committed Aug 26, 2020
1 parent 3ee3419 commit e17e6d1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions acme_common/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ macro_rules! exit_match {
match $e {
Ok(_) => {}
Err(e) => {
eprintln!("Error: {}", e);
log::error!("Error: {}", e);
std::process::exit(3);
}
}
Expand Down Expand Up @@ -47,7 +47,7 @@ pub fn init_server(foreground: bool, pid_file: Option<&str>, default_pid_file: &
let daemonize = Daemonize::new().pid_file(pid_file.unwrap_or(default_pid_file));
exit_match!(daemonize.start());
} else if let Some(f) = pid_file {
exit_match!(write_pid_file(f));
exit_match!(write_pid_file(f).map_err(|e| e.prefix(f)));
}
}

Expand Down

0 comments on commit e17e6d1

Please sign in to comment.