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

Present a clearer message on bad_alloc & return consistent error code #5895

Merged
merged 1 commit into from
Oct 3, 2018

Conversation

spoonincode
Copy link
Contributor

We normally bet on the DB size guard to cleanly shut down nodeos when the free DB size becomes low. But one user (#5791) encountered a bad_alloc without the guard kicking in. We can't do better then an unclean shutdown but we can do better conveying the error.

Make a bad_alloc exception print a more clear message and make it exit with the same error code as main.cpp lists as BAD_ALLOC by getting rid of the unorthodox SIGUSR1. Also implicitly gets rid of a POSIXism.

@heifner heifner merged commit 93d3630 into release/1.3.x Oct 3, 2018
@heifner heifner deleted the pretty_bad_alloc branch October 3, 2018 17:17
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants