Fix daemonize (#10000)

* Revert "prevent silent errors in daemon mode, closes #9367 (#9946)"

This reverts commit 52d5278a62.

* deps(daemonize): switch back to crates.io
This commit is contained in:
Andronik Ordian
2018-11-30 14:39:30 +03:00
committed by Afri Schoedon
parent 7c0d894ccf
commit 7000c394b2
3 changed files with 11 additions and 11 deletions

View File

@@ -544,6 +544,12 @@ fn execute_impl<Cr, Rr>(cmd: RunCmd, logger: Arc<RotatingLogger>, on_client_rq:
// set network path.
net_conf.net_config_path = Some(db_dirs.network_path().to_string_lossy().into_owned());
// run in daemon mode
if let Some(pid_file) = cmd.daemon {
info!("Running as a daemon process!");
daemonize(pid_file)?;
}
let restoration_db_handler = db::restoration_db_handler(&client_path, &client_config);
let client_db = restoration_db_handler.open(&client_path)
.map_err(|e| format!("Failed to open database {:?}", e))?;
@@ -809,12 +815,6 @@ fn execute_impl<Cr, Rr>(cmd: RunCmd, logger: Arc<RotatingLogger>, on_client_rq:
client.set_exit_handler(on_client_rq);
updater.set_exit_handler(on_updater_rq);
// run in daemon mode
if let Some(pid_file) = cmd.daemon {
info!("Running as a daemon process!");
daemonize(pid_file)?;
}
Ok(RunningClient {
inner: RunningClientInner::Full {
rpc: rpc_direct,