how can I start a bash shell then while making use...
# getting-started
z
how can I start a bash shell then while making use of kotlin coroutines send commands to it and get the stdout?
e
on JVM? this isn't something that the underlying Java platform provides good APIs for
you could use
ProcessBuilder
and read/write its pipes, but a. that's blocking and b. it won't act like it's in a terminal
IntelliJ uses https://github.com/JetBrains/pty4j to wrap native code which is able to interact with terminal APIs
if you just want to run commands and get their output individually though, there's no need for any of that. just use a
ProcessBuilder
for each
z
I see, thank you