Skip to content

Commit 5372d12

Browse files
David Robertsrjernst
authored andcommitted
Give jspawnhelper execute permissions in bundled JDK (#39787)
The posix_spawn method of launching a process from Java goes via an intermediate process called jspawnhelper which lives in the lib directory rather than the bin directory and hence got missed by the original chmod loop. This change adds jspawnhelper as a special case. It's the only program that's in the lib directory in a macOS JDK 11.
1 parent 5579b04 commit 5372d12

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

distribution/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ configure(subprojects.findAll { ['archives', 'packages'].contains(it.name) }) {
385385
copySpec {
386386
from project(':distribution').tasks.getByName("extract${platform.capitalize()}Jdk")
387387
eachFile { FileCopyDetails details ->
388-
if (details.relativePath.segments[-2] == 'bin') {
388+
if (details.relativePath.segments[-2] == 'bin' || details.relativePath.segments[-1] == 'jspawnhelper') {
389389
details.mode = 0755
390390
}
391391
}

distribution/packages/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ Closure commonPackageConfig(String type, boolean oss) {
145145
String[] segments = fcp.relativePath.segments
146146
for (int i = segments.length - 2; i > 2; --i) {
147147
directory('/' + segments[0..i].join('/'), 0755)
148-
if (segments[-2] == 'bin') {
148+
if (segments[-2] == 'bin' || segments[-1] == 'jspawnhelper') {
149149
fcp.mode = 0755
150150
} else {
151151
fcp.mode = 0644

0 commit comments

Comments
 (0)