From 18914b4df221b0dab8327f820d41e7beb06ff377 Mon Sep 17 00:00:00 2001 From: David Roberts Date: Thu, 7 Mar 2019 12:56:10 +0000 Subject: [PATCH] Give jspawnhelper execute permissions in bundled JDK 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 | 4 ++-- distribution/packages/build.gradle | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/distribution/build.gradle b/distribution/build.gradle index 52be1b2591c31..cc4af46d902ab 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 } } @@ -587,4 +587,4 @@ subprojects { dependencies { "${configuration.name}" project(subproject.path) } -} \ No newline at end of file +} diff --git a/distribution/packages/build.gradle b/distribution/packages/build.gradle index b0b7a1d4b8295..8d1bbbcc39987 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