diff options
author | UdjinM6 <UdjinM6@dash.org> | 2016-11-02 21:59:09 +0300 |
---|---|---|
committer | Luke Dashjr <luke-jr+git@utopios.org> | 2016-12-02 07:41:11 +0000 |
commit | f85ee01303b3d5127a31285b2682fcae2f8df64d (patch) | |
tree | b9ecfce4ec90081461e6e2a4ec017008ceb188d2 /src/qt | |
parent | 5bcb05d4e1304ac3582f1779a25693c0065c69e9 (diff) | |
download | bitcoin-f85ee01303b3d5127a31285b2682fcae2f8df64d.tar.xz |
Fix exit codes:
- `--help`, `--version` etc should exit with `0` i.e. no error ("not enough args" case should still trigger an error)
- error reading config file should exit with `1`
Slightly refactor AppInitRPC/AppInitRawTx to return standard exit codes (EXIT_FAILURE/EXIT_SUCCESS) or CONTINUE_EXECUTION (-1)
Github-Pull: #9067
Rebased-From: bd0de1386e1c7f9b875d52290de0d561c8d56bc9
Diffstat (limited to 'src/qt')
-rw-r--r-- | src/qt/bitcoin.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp index 430e6dd0e8..595fa48253 100644 --- a/src/qt/bitcoin.cpp +++ b/src/qt/bitcoin.cpp @@ -573,7 +573,7 @@ int main(int argc, char *argv[]) { HelpMessageDialog help(NULL, mapArgs.count("-version")); help.showOrPrint(); - return 1; + return 0; } /// 5. Now that settings and translations are available, ask user for data directory @@ -594,7 +594,7 @@ int main(int argc, char *argv[]) } catch (const std::exception& e) { QMessageBox::critical(0, QObject::tr(PACKAGE_NAME), QObject::tr("Error: Cannot parse configuration file: %1. Only use key=value syntax.").arg(e.what())); - return false; + return 1; } /// 7. Determine network (and switch to network specific options) |