From 77826cf8253e5bda0ca7e694a2d100e4988d9e38 Mon Sep 17 00:00:00 2001 From: tstuefe Date: Thu, 8 Sep 2022 09:15:22 +0200 Subject: [PATCH] Move semaphore initialization for dispatcher thread up --- src/hotspot/os/posix/signals_posix.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/hotspot/os/posix/signals_posix.cpp b/src/hotspot/os/posix/signals_posix.cpp index 99edfc6a9936d..ae48318ad1830 100644 --- a/src/hotspot/os/posix/signals_posix.cpp +++ b/src/hotspot/os/posix/signals_posix.cpp @@ -1820,13 +1820,18 @@ int PosixSignals::init() { return JNI_ERR; } + // Initialize data for jdk.internal.misc.Signal + if (!ReduceSignalUsage) { + jdk_misc_signal_init(); + } + signal_sets_init(); install_signal_handlers(); - // Initialize data for jdk.internal.misc.Signal - if (!ReduceSignalUsage) { - jdk_misc_signal_init(); + // Test-send ourselves a SIGQUIT. Should come delayed at the end of VM initialization, when dispatcher thread is up and running. + if (UseNewCode) { + ::kill(::getpid(), SIGQUIT); } return JNI_OK;