System.exit deadlock if called within a hook
David Lloyd
david.lloyd at redhat.com
Mon Apr 25 13:41:23 UTC 2022
On Mon, Apr 25, 2022 at 8:09 AM <remi.catherinot at orange.com> wrote:
> because it would still run finally blocks, which cannot happen for no return methods like System.exit and Runtime.halt
FWIW I don't think this is correct. `exit` and `halt` etc. cannot
*return* but they're definitely allowed to throw an exception
(`SecurityException` is presently specified) and thus are allowed to
unwind the stack, even through `finally` blocks.
--
- DML • he/him
More information about the core-libs-dev
mailing list