From cecb038b4b6931a2afc2a24dac103c147a24764d Mon Sep 17 00:00:00 2001 From: Seun LanLege Date: Tue, 20 Nov 2018 17:50:43 +0100 Subject: [PATCH] prevent silent errors in daemon mode, closes #9367 --- parity/run.rs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/parity/run.rs b/parity/run.rs index 03dbcaffb0b..7ee0250d6bd 100644 --- a/parity/run.rs +++ b/parity/run.rs @@ -404,11 +404,6 @@ fn execute_impl(cmd: RunCmd, logger: Arc, on_client_rq: // create dirs used by parity cmd.dirs.create_dirs(cmd.acc_conf.unlocked_accounts.len() == 0, cmd.secretstore_conf.enabled)?; - // run in daemon mode - if let Some(pid_file) = cmd.daemon { - daemonize(pid_file)?; - } - //print out running parity environment print_running_environment(&spec.data_dir, &cmd.dirs, &db_dirs); @@ -801,6 +796,12 @@ fn execute_impl(cmd: RunCmd, logger: Arc, 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,