HomePhabricator

Return EXIT_FAILURE on post-init fatal errors

Description

Return EXIT_FAILURE on post-init fatal errors

Summary:
It seems odd to return EXIT_SUCCESS when the node aborted
execution due a fatal internal error or any post-init problem
that triggers an unrequested shutdown.

e.g. blocks or coins db I/O errors, disconnect block failure,
failure during thread import (external blocks loading process
error), among others.

Co-authored-by: Ryan Ofsky <ryan@ofsky.org>

This is a partial backport of core#27708, core#27895 and core#28028

Included commits:

Partially included commit: declare NodeContext in the main function and pass it to AppInit:

Depends on D18597

Test Plan: ninja all check-all

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Differential Revision: https://reviews.bitcoinabc.org/D18598

Details

Provenance
furszy <matiasfurszyfer@protonmail.com>Authored on May 20 2023, 13:51
PiRKCommitted on Sep 11 2025, 09:16
PiRKPushed on Sep 11 2025, 09:16
Reviewer
Restricted Project
Differential Revision
D18598: Return EXIT_FAILURE on post-init fatal errors
Parents
rABC0641089bac14: refactor: index: use `AbortNode` in fatal error helper
Branches
Unknown
Tags
Unknown