mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-23 22:19:39 +01:00
init: Fix non-zero code on interrupt
An interrupt does not create a failure exit code during normal operation. This should also be the case when interrupt is triggered during initialization. However a failure exit code is currently returned if an interrupt occurs during init. Fix this by making `AppInitMain` return true instead of false, which further up the call stack sets the `EXIT_FAILURE` code. Also add a check for the interrupt condition during GUI startup.
This commit is contained in:
@@ -1830,7 +1830,7 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info)
|
||||
// requested to kill the GUI during the last operation. If so, exit.
|
||||
if (ShutdownRequested(node)) {
|
||||
LogInfo("Shutdown requested. Exiting.");
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
ChainstateManager& chainman = *Assert(node.chainman);
|
||||
@@ -2006,7 +2006,7 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info)
|
||||
}
|
||||
|
||||
if (ShutdownRequested(node)) {
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
// ********************************************************* Step 12: start node
|
||||
|
||||
Reference in New Issue
Block a user