Skip to content
Permalink
Browse files
8261920: [AIX] jshell command throws java.io.IOError on non English l…
…ocales

Reviewed-by: stuefe
  • Loading branch information
Ichiroh Takiguchi committed Feb 24, 2021
1 parent 8c07063 commit 2c99bad082c672b2f1b4dc7792c213b2e9076f57
Showing 2 changed files with 8 additions and 0 deletions.
@@ -14,6 +14,7 @@
import java.io.InputStream;
import java.io.InterruptedIOException;
import java.io.OutputStream;
import java.util.Map;
import java.util.Objects;

/**
@@ -29,6 +30,12 @@ public static String exec(boolean redirectInput, final String... cmd) throws IOE
try {
Log.trace("Running: ", cmd);
ProcessBuilder pb = new ProcessBuilder(cmd);
if (OSUtils.IS_AIX) {
Map<String,String> env = pb.environment();
env.put("PATH", "/opt/freeware/bin:" + env.get("PATH"));
env.put("LANG", "C");
env.put("LC_ALL", "C");
}
if (redirectInput) {
pb.redirectInput(ProcessBuilder.Redirect.INHERIT);
}
@@ -32,6 +32,7 @@ public class OSUtils {
&& System.getenv("ConEmuPID") != null;

public static final boolean IS_OSX = System.getProperty("os.name").toLowerCase().contains("mac");
public static final boolean IS_AIX = System.getProperty("os.name").equals("AIX");

public static String TTY_COMMAND;
public static String STTY_COMMAND;

1 comment on commit 2c99bad

@openjdk-notifier
Copy link

@openjdk-notifier openjdk-notifier bot commented on 2c99bad Feb 24, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.