From b37c41fd6ec704babf37325530e7cb9babf1ac0c Mon Sep 17 00:00:00 2001 From: Allen Wittenauer Date: Wed, 21 Oct 2015 08:00:26 -0700 Subject: [PATCH] HADOOP-12495. Fix posix_spawn error on OS X (aw) --- .../src/main/java/org/apache/hadoop/util/Shell.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/Shell.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/Shell.java index d6eca69d95..a451369e95 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/Shell.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/Shell.java @@ -817,6 +817,9 @@ protected void run() throws IOException { return; } exitCode = 0; // reset for next run + if (Shell.MAC) { + System.setProperty("jdk.lang.Process.launchMechanism", "POSIX_SPAWN"); + } runCommand(); }