mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-07-21 18:25:41 +03:00
27 lines
1,005 B
Diff
27 lines
1,005 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;
|