mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-08-05 21:37:15 +02:00
https://github.com/corretto/corretto-8 Amazon's no-cost, multi-platform, production-ready distribution of OpenJDK 8 This aport can be cross-compiled with the same method used for openjdk11/17/21, unlike community/openjdk8 (icedtea).
28 lines
1005 B
Diff
28 lines
1005 B
Diff
--- openjdk.orig/jdk/src/solaris/native/java/lang/UNIXProcess_md.c
|
|
+++ openjdk/jdk/src/solaris/native/java/lang/UNIXProcess_md.c
|
|
@@ -552,7 +552,11 @@
|
|
startChild(JNIEnv *env, jobject process, ChildStuff *c, const char *helperpath) {
|
|
switch (c->mode) {
|
|
case MODE_VFORK:
|
|
+// use regular fork when running on musl
|
|
+// this should fix deadlocks on aarch64
|
|
+#if defined(__GLIBC__) || defined(__UCLIBC__)
|
|
return vforkChild(c);
|
|
+#endif
|
|
case MODE_FORK:
|
|
return forkChild(c);
|
|
#if defined(__solaris__) || defined(_ALLBSD_SOURCE) || defined(_AIX)
|
|
@@ -651,8 +655,12 @@
|
|
if (resultPid < 0) {
|
|
switch (c->mode) {
|
|
case MODE_VFORK:
|
|
+// use regular fork when running on musl
|
|
+// this should fix deadlocks on aarch64
|
|
+#if defined(__GLIBC__) || defined(__UCLIBC__)
|
|
throwIOException(env, errno, "vfork failed");
|
|
break;
|
|
+#endif
|
|
case MODE_FORK:
|
|
throwIOException(env, errno, "fork failed");
|
|
break;
|