You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I copied the example in the README.md and when I would try run it, it would just stall forever on waitFor(). The code is in xtend, which is a java dialect
// The command to run in a PTY...val cmd = #["/bin/sh", "-l" ]
val env = #{"TERM"->"xterm"}
val pty =PtyProcess.exec(cmd, env);
val os = pty.getOutputStream()
val is = pty.getInputStream()
newThread[
newBufferedReader(newInputStreamReader(is)).lines().forEach[println(it)]
].start()
newThread[
newBufferedReader(newInputStreamReader(pty.getErrorStream())).lines().forEach[System.err.println(it)]
].start()
println("Waiting")
// wait until the PTY child process terminates...val result = pty.waitFor();
// free up resources.
pty.destroy();
println(result)
The logs aren't particularly useful
2018-11-01 10:59:44,262 [DEBUG ] ExtractedNative 93 │ Found /tmp/pty4j-linux-x86_64-8391184450079375244 in 0 ms
2018-11-01 10:59:44,262 [DEBUG ] ExtractedNative 98 │ Listed files in 0 ms
2018-11-01 10:59:44,262 [DEBUG ] ExtractedNative 109 │ Checked upToDate in 0 ms
2018-11-01 10:59:44,262 [DEBUG ] ExtractedNative 116 │ Cleared directory in 1 ms
2018-11-01 10:59:44,263 [DEBUG ] ExtractedNative 122 │ Copied [resources/com/pty4j/native/linux/x86_64/libpty.so] in 1 ms
2018-11-01 10:59:44,263 [INFO ] ExtractedNative 126 │ Extracted pty4j native in 1 ms
waiting
So I wanted to see what the command actually does
$ /bin/sh -l sirolf2009 <[email protected]> sort timeseries
/bin/sh: 25: source: not found
$ ^C
$ exit
$
I get a source not found, and then a subshell. Which is probably why I was stalling, the subshell was waiting for input. So shouldn't I have seen /bin/sh: 25: source: not found in my console?
Details:
Pty4j v0.8.5
$ uname -a
Linux northpool2 4.9.0-8-amd64 #1 SMP Debian 4.9.110-3+deb9u6 (2018-10-08) x86_64 GNU/Linux
The text was updated successfully, but these errors were encountered:
I copied the example in the README.md and when I would try run it, it would just stall forever on
waitFor()
. The code is in xtend, which is a java dialectThe logs aren't particularly useful
So I wanted to see what the command actually does
I get a source not found, and then a subshell. Which is probably why I was stalling, the subshell was waiting for input. So shouldn't I have seen
/bin/sh: 25: source: not found
in my console?Details:
Pty4j v0.8.5
The text was updated successfully, but these errors were encountered: