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

Commit 4138960

Browse files
Andronik Ordian5chdn
Andronik Ordian
authored andcommitted
Fix daemonize (#10000)
* Revert "prevent silent errors in daemon mode, closes #9367 (#9946)" This reverts commit 52d5278. * deps(daemonize): switch back to crates.io
1 parent 8f95d67 commit 4138960

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

Cargo.lock

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ fake-fetch = { path = "util/fake-fetch" }
8484
winapi = { version = "0.3.4", features = ["winsock2", "winuser", "shellapi"] }
8585

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

8989
[features]
9090
miner-debug = ["ethcore/miner-debug"]

parity/run.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -537,6 +537,12 @@ fn execute_impl<Cr, Rr>(cmd: RunCmd, logger: Arc<RotatingLogger>, on_client_rq:
537537
// set network path.
538538
net_conf.net_config_path = Some(db_dirs.network_path().to_string_lossy().into_owned());
539539

540+
// run in daemon mode
541+
if let Some(pid_file) = cmd.daemon {
542+
info!("Running as a daemon process!");
543+
daemonize(pid_file)?;
544+
}
545+
540546
let restoration_db_handler = db::restoration_db_handler(&client_path, &client_config);
541547
let client_db = restoration_db_handler.open(&client_path)
542548
.map_err(|e| format!("Failed to open database {:?}", e))?;
@@ -795,12 +801,6 @@ fn execute_impl<Cr, Rr>(cmd: RunCmd, logger: Arc<RotatingLogger>, on_client_rq:
795801
client.set_exit_handler(on_client_rq);
796802
updater.set_exit_handler(on_updater_rq);
797803

798-
// run in daemon mode
799-
if let Some(pid_file) = cmd.daemon {
800-
info!("Running as a daemon process!");
801-
daemonize(pid_file)?;
802-
}
803-
804804
Ok(RunningClient {
805805
inner: RunningClientInner::Full {
806806
rpc: rpc_direct,

0 commit comments

Comments
 (0)