Handle clap errors manually and don't reset SIGPIPE (#6012)

Instead of resetting `SIGPIPE` to the system default handler, we now
handle a clap error manually and ignore any error when writing to
`stdout`/`stderr`. In this way, the node does not silently stops when it
encounters a `SIGPIPE` in normal mode and we still support piping of the
cli output.
This commit is contained in:
Bastian Köcher
2020-05-13 19:43:38 +02:00
committed by GitHub
parent b99033368b
commit daf8cf0600
2 changed files with 21 additions and 21 deletions
-2
View File
@@ -63,8 +63,6 @@ impl SubstrateCli for Cli {
/// Parse command line arguments into service configuration.
pub fn run() -> Result<()> {
sc_cli::reset_signal_pipe_handler()?;
let cli = Cli::from_args();
match &cli.subcommand {