aboutsummaryrefslogtreecommitdiff
path: root/src/bitcoind.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <[email protected]>2016-11-08 10:32:27 +0100
committerWladimir J. van der Laan <[email protected]>2016-11-08 10:55:03 +0100
commitf53023dbb8609add92497fa7b296ba48304d905a (patch)
treec075f12f09e392b9e5e0daca11fdf4976b13efc5 /src/bitcoind.cpp
parentMerge #9095: test: Fix test_random includes (diff)
parentEvery main()/exit() should return/use one of EXIT_ codes instead of magic num... (diff)
downloaddiscoin-f53023dbb8609add92497fa7b296ba48304d905a.tar.xz
discoin-f53023dbb8609add92497fa7b296ba48304d905a.zip
Merge #9067: Fix exit codes
4441018 Every main()/exit() should return/use one of EXIT_ codes instead of magic numbers (UdjinM6) bd0de13 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` (UdjinM6)
Diffstat (limited to 'src/bitcoind.cpp')
-rw-r--r--src/bitcoind.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/bitcoind.cpp b/src/bitcoind.cpp
index 351463c25..3352a76de 100644
--- a/src/bitcoind.cpp
+++ b/src/bitcoind.cpp
@@ -92,7 +92,7 @@ bool AppInit(int argc, char* argv[])
}
fprintf(stdout, "%s", strUsage.c_str());
- return false;
+ return true;
}
try
@@ -126,7 +126,7 @@ bool AppInit(int argc, char* argv[])
if (fCommandLine)
{
fprintf(stderr, "Error: There is no RPC client functionality in bitcoind anymore. Use the bitcoin-cli utility instead.\n");
- exit(1);
+ exit(EXIT_FAILURE);
}
if (GetBoolArg("-daemon", false))
{
@@ -177,5 +177,5 @@ int main(int argc, char* argv[])
// Connect bitcoind signal handlers
noui_connect();
- return (AppInit(argc, argv) ? 0 : 1);
+ return (AppInit(argc, argv) ? EXIT_SUCCESS : EXIT_FAILURE);
}