From 89a1f155d3a8e26f110639d8945c9553a3f6dc99 Mon Sep 17 00:00:00 2001 From: David Roberts Date: Thu, 7 Mar 2019 18:53:44 +0000 Subject: [PATCH] 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. --- distribution/build.gradle | 2 +- distribution/packages/build.gradle | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/distribution/build.gradle b/distribution/build.gradle index 295dc35d270..6b90c1415cd 100644 --- a/distribution/build.gradle +++ b/distribution/build.gradle @@ -385,7 +385,7 @@ configure(subprojects.findAll { ['archives', 'packages'].contains(it.name) }) { copySpec { from project(':distribution').tasks.getByName("extract${platform.capitalize()}Jdk") eachFile { FileCopyDetails details -> - if (details.relativePath.segments[-2] == 'bin') { + if (details.relativePath.segments[-2] == 'bin' || details.relativePath.segments[-1] == 'jspawnhelper') { details.mode = 0755 } } diff --git a/distribution/packages/build.gradle b/distribution/packages/build.gradle index b0b7a1d4b82..8d1bbbcc399 100644 --- a/distribution/packages/build.gradle +++ b/distribution/packages/build.gradle @@ -145,7 +145,7 @@ Closure commonPackageConfig(String type, boolean oss) { String[] segments = fcp.relativePath.segments for (int i = segments.length - 2; i > 2; --i) { directory('/' + segments[0..i].join('/'), 0755) - if (segments[-2] == 'bin') { + if (segments[-2] == 'bin' || segments[-1] == 'jspawnhelper') { fcp.mode = 0755 } else { fcp.mode = 0644