diff --git a/src/hotspot/share/runtime/thread.cpp b/src/hotspot/share/runtime/thread.cpp index 7435db753a..347d0922c5 100644 --- a/src/hotspot/share/runtime/thread.cpp +++ b/src/hotspot/share/runtime/thread.cpp @@ -4255,6 +4255,12 @@ bool Threads::destroy_vm() { Mutex::_as_suspend_equivalent_flag); } + EventShutdown e; + if (e.should_commit()) { + e.set_reason("No remaining non-daemon Java threads"); + e.commit(); + } + // Hang forever on exit if we are reporting an error. if (ShowMessageBoxOnError && VMError::is_error_reported()) { os::infinite_sleep();