src: pass along errors from `--security-reverts`
Pass along errors from Revert()
when a security revert
is unknown (which currently applies to all possible values).
Previously, we would unconditionally call exit()
, which is
not nice for embedding use cases, and could crash because we
were holding a lock for a mutex in ProcessGlobalArgs()
that
would be destroyed by calling exit()
.
Also, add a regression test that makes sure that the process exits with the right exit code and not a crash.
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
tests and/or benchmarks are included -
commit message follows commit guidelines