Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Commit

Permalink
Fix daemonize (#10000)
Browse files Browse the repository at this point in the history
* Revert "prevent silent errors in daemon mode, closes #9367 (#9946)"

This reverts commit 52d5278.

* deps(daemonize): switch back to crates.io
  • Loading branch information
ordian authored and 5chdn committed Nov 30, 2018
1 parent ac9fcb4 commit 815037b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
8 changes: 4 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Expand Up @@ -83,7 +83,7 @@ fake-fetch = { path = "util/fake-fetch" }
winapi = { version = "0.3.4", features = ["winsock2", "winuser", "shellapi"] }

[target.'cfg(not(windows))'.dependencies]
daemonize = { git = "https://github.com/paritytech/daemonize" }
daemonize = "0.3"

[features]
miner-debug = ["ethcore/miner-debug"]
Expand Down
12 changes: 6 additions & 6 deletions parity/run.rs
Expand Up @@ -543,6 +543,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))?;
Expand Down Expand Up @@ -807,12 +813,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,
Expand Down

0 comments on commit 815037b

Please sign in to comment.