Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

nodeos Non-Zero Exit Status for Expected Behavior #7346

Closed
kj4ezj opened this issue May 13, 2019 · 1 comment
Closed

nodeos Non-Zero Exit Status for Expected Behavior #7346

kj4ezj opened this issue May 13, 2019 · 1 comment
Assignees
Labels

Comments

@kj4ezj
Copy link
Contributor

kj4ezj commented May 13, 2019

When running nodeos --version or nodeos --help, the process exits with a non-zero exit status (-1 in C++, 255 in BASH). Conventionally, this means the program has encountered an error. This will cause shell environments or scripts with -e set to exit with a failure.

This is happening because main() calls app:initialize() which prints the requested information. It returns false because nodeos was not initialized, but main() takes this as an initialization failure.

Looking at this with arhag, we also believe the FIXED_REVERSIBLE and EXTRACTED_GENESIS cases should return EXIT_SUCCESS.

Steps to Reproduce the Issue

In BASH:

$ nodeos --version
v1.7.0-rc2-57-gc0b542edc
$ echo $?
255
$ nodeos --help
$ echo $?
255

Note that all supported versions of nodeos are effected at the time this issue was created.

Recommended Solution

Return EXIT_SUCCESS in these four cases, which is equal to zero.

@andriantolie
Copy link
Contributor

PR merged

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants