More error fiddling
This commit is contained in:
parent
ddae5cc24f
commit
70388095a5
1 changed files with 4 additions and 1 deletions
|
@ -63,7 +63,10 @@ fn daemonize(options: &getopts::Matches) -> Result<()> {
|
|||
}
|
||||
let mut log_file = utils::get_data_root()?;
|
||||
log_file.push("polaris.log");
|
||||
let pid = daemonize_redirect(Some(&log_file), Some(&log_file), ChdirMode::NoChdir)?;
|
||||
let pid = match daemonize_redirect(Some(&log_file), Some(&log_file), ChdirMode::NoChdir) {
|
||||
Ok(p) => p,
|
||||
Err(e) => bail!("Daemonize error: {#?}", e),
|
||||
};
|
||||
let mut pid_path = utils::get_data_root()?;
|
||||
pid_path.push("polaris.pid");
|
||||
let mut file = File::create(pid_path)?;
|
||||
|
|
Loading…
Add table
Reference in a new issue