rigine-
De : David Holmes
Envoyé : mardi 26 avril 2022 01:24
À : CATHERINOT Rémi DTSI/PFS ;
core-libs-dev@openjdk.java.net
Objet : Re: System.exit deadlock if called within a hook
On 25/04/2022 11:08 pm, remi.catheri...@orange.com wrote:
> Hi,
>
> Exemple code to deadlock the JVM. Only Runtime
On Mon, Apr 25, 2022 at 9:25 AM wrote:
>
> Ok, you're right that it can raise an exception when the calling thread does
> not have the security privileges needed. But what if it had them ? Right now
> the deadlock comes from the fact is doesn't got back to the caller with an
> exception and doe
eels like a JVM workaround rather than a framework workaround.
Regards,
Orange Restricted
-Message d'origine-
De : David Lloyd
Envoyé : lundi 25 avril 2022 15:41
À : CATHERINOT Rémi DTSI/PFS
Cc : core-libs-dev@openjdk.java.net
Objet : Re: System.exit deadlock if called within a
On Mon, Apr 25, 2022 at 8:09 AM 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
(`Secu
Hi,
Exemple code to deadlock the JVM. Only Runtime.halt from within the JVM or a
SIGKILL from outside stops it. Normal kills and Ctrl-C (which is a SIGTERM)
fail to do so.
public class ExitInHookDemo {
public static void main(String...args) {
Runtime.getRunti