-
Notifications
You must be signed in to change notification settings - Fork 114
Closed
Description
With the following code, using this StreamPumper from here:
String[] cmd = {"/bin/sh", "-l"};
Map<String, String> env = new HashMap<>(System.getenv());
if (!env.containsKey("TERM")) env.put("TERM", "xterm-256color");
PtyProcess process = new PtyProcessBuilder().setCommand(cmd).setEnvironment(env).start();
OutputStream os = process.getOutputStream();
new StreamPumper("In", System.in, os);
InputStream is = process.getInputStream();
new StreamPumper("Out", is, System.out);
return process.waitFor();I'm getting an "echo" that I (conceptually) don't quite understand how to get rid of when using Pty4j:
[main] INFO com.pty4j.util.ExtractedNative - Extracted pty4j native in 8 ms
...$ ls
ls
...I could put a fully running standalone reproducer project e.g. on https://github.com/vorburger/LearningPty4J, if there is interest.
Metadata
Metadata
Assignees
Labels
No labels