[libbluray-devel] [Git][videolan/libbluray][master] BD-J: start the JVM with -Xrs
Petri Hintukainen (@hpi)
gitlab at videolan.org
Sun Nov 15 20:14:24 UTC 2026
Petri Hintukainen pushed to branch master at VideoLAN / libbluray
Commits:
f3c13c6e by Martin Penkava at 2026-11-15T11:02:11+01:00
BD-J: start the JVM with -Xrs
HotSpot installs handlers for SIGINT, SIGTERM and SIGHUP when the VM is
created. They replace the handlers of the application that loaded
libbluray, and on such a signal the VM runs its shutdown and calls
exit() from one of its own threads while the application is still
running.
-Xrs keeps the VM away from these signals, as documented for embedded
VMs. Not passed to J2ME VMs.
- - - - -
1 changed file:
- src/libbluray/bdj/bdj.c
Changes:
=====================================
src/libbluray/bdj/bdj.c
=====================================
@@ -920,6 +920,11 @@ static int _create_jvm(void *jvm_lib, const char *java_home, BDJ_CONFIG *cfg,
option[n++].optionString = str_dup ("-Xms256M");
option[n++].optionString = str_dup ("-Xmx256M");
option[n++].optionString = str_dup ("-Xss2048k");
+#ifndef HAVE_BDJ_J2ME
+ /* Leave SIGINT, SIGTERM and SIGHUP to the application. Without -Xrs HotSpot installs its
+ * own handlers and calls exit() from a JVM thread while the application is running. */
+ option[n++].optionString = str_dup ("-Xrs");
+#endif
#ifdef HAVE_BDJ_J2ME
option[n++].optionString = str_printf("-Djava.home=%s", java_home);
option[n++].optionString = str_printf("-Xbootclasspath/a:%s/lib/xmlparser.jar", java_home);
View it on GitLab: https://code.videolan.org/videolan/libbluray/-/commit/f3c13c6e0320c1f8db5480c082d7fab2a64d8ce8
--
View it on GitLab: https://code.videolan.org/videolan/libbluray/-/commit/f3c13c6e0320c1f8db5480c082d7fab2a64d8ce8
You're receiving this email because of your account on code.videolan.org. Manage all notifications: https://code.videolan.org/-/profile/notifications | Help: https://code.videolan.org/help
More information about the libbluray-devel
mailing list