Attempt to graceful shutdown in case of panics (#8999)

* Handle graceful shutdown with unwinding

* Fix a race condition

* Avoid double exit deadlock

* typo: fix docs

* Fix ethkey cli compilation

* Fix all other cases panic_hook::set -> panic_hook::set_abort

* struct fields do not need to be public

* Add comments on why exiting AtomicBool is needed
This commit is contained in:
Wei Tang
2018-07-02 17:53:50 +08:00
committed by Afri Schoedon
parent 5ef41ed53e
commit a1a002f4da
6 changed files with 115 additions and 24 deletions

View File

@@ -184,7 +184,7 @@ impl fmt::Display for Error {
}
fn main() {
panic_hook::set();
panic_hook::set_abort();
match execute(env::args()) {
Ok(_) => {