Skip to content

Commit 1bee015

Browse files
committed
fix Processes test failure for openjdk-src build with recent versions of OpenJDK 7
It looks like the UNIXProcess class has added posix_spawn support, which is enabled by default unless overriden by the jdk.lang.Process.launchMechanism system property. For some reason I haven't bothered to investigate, posix_spawn fails on MacOS, so this patch sets the aforementioned property to "fork" to get the old, working behavior.
1 parent f8f1e33 commit 1bee015

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/classpath-openjdk.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3329,6 +3329,9 @@ uint64_t jvmInitProperties(Thread* t, uintptr_t* arguments)
33293329
->path());
33303330

33313331
local::setProperty(t, method, *properties, "file.encoding", "UTF-8");
3332+
3333+
local::setProperty(t, method, *properties, "jdk.lang.Process.launchMechanism", "fork");
3334+
33323335
#ifdef ARCH_x86_32
33333336
local::setProperty(t, method, *properties, "os.arch", "x86");
33343337
#elif defined ARCH_x86_64

0 commit comments

Comments
 (0)