Closed kpcyrd closed 2 years ago
This function is called when p2pool can't continue running in any way, so it must stop immediately. exit
does too many other things before terminating the program: https://en.cppreference.com/w/cpp/utility/program/exit
So abort
is used instead.
Although you have a point that wrong command line options can and should be handled more gracefully.
There are a few places that call to
panic
as defined here:https://github.com/SChernykh/p2pool/blob/d23c46ff845cb9568890d96a380d074592613ce5/src/util.cpp#L50-L61
This causes the program to exit with a segfault like this (even if just used with incorrect arguments):
I think this should be a call to
exit(1)
.