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

Commit

Permalink
prevent silent errors in daemon mode, closes #9367 (#9946)
Browse files Browse the repository at this point in the history
  • Loading branch information
seunlanlege authored and 5chdn committed Nov 27, 2018
1 parent edc6582 commit 56e942f
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions parity/run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -396,11 +396,6 @@ fn execute_impl<Cr, Rr>(cmd: RunCmd, logger: Arc<RotatingLogger>, 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);

Expand Down Expand Up @@ -800,6 +795,12 @@ 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 56e942f

Please sign in to comment.