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 d6eca69d95b..a451369e956 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 @@ public abstract class Shell { return; } exitCode = 0; // reset for next run + if (Shell.MAC) { + System.setProperty("jdk.lang.Process.launchMechanism", "POSIX_SPAWN"); + } runCommand(); }