aboutsummaryrefslogtreecommitdiffstats
path: root/community/openjdk7/icedtea-jdk-disable-vfork.patch
diff options
context:
space:
mode:
Diffstat (limited to 'community/openjdk7/icedtea-jdk-disable-vfork.patch')
-rw-r--r--community/openjdk7/icedtea-jdk-disable-vfork.patch27
1 files changed, 27 insertions, 0 deletions
diff --git a/community/openjdk7/icedtea-jdk-disable-vfork.patch b/community/openjdk7/icedtea-jdk-disable-vfork.patch
new file mode 100644
index 0000000000..3cd3e5c448
--- /dev/null
+++ b/community/openjdk7/icedtea-jdk-disable-vfork.patch
@@ -0,0 +1,27 @@
+--- 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;