Browse Source

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.
David Roberts 6 years ago
parent
commit
7e1073259d
2 changed files with 2 additions and 2 deletions
  1. 1 1
      distribution/build.gradle
  2. 1 1
      distribution/packages/build.gradle

+ 1 - 1
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
           }
         }

+ 1 - 1
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