javaterminal / cloudterm

Cloud Web Terminal Emulator. Opens your terminal to Web.
MIT License
78 stars 37 forks source link

Issue in `pty.waitFor() ` #6

Closed Xarrow closed 4 years ago

Xarrow commented 4 years ago

https://github.com/javaterminal/cloudterm/blob/f6f1f6a608980ee190b17d16e1e23b0a17dfac88/src/main/java/com/kodedu/cloudterm/service/TerminalService.java#L95

Hi , i think process.waitFor() in TerminalService#initializeProcess is not necessary . In Pty4j official example, it shows wait until the PTY child process terminates.... This code may be only work in a none web application, it will exit after executing ,so they need to block the thread for input/output action.

So, i am not sure whether process.waitFor() in TerminalService#initializeProcess is necessary. I try to remove it and program not affected.