Search code examples
javascalaspawnptylxc

How to spawn a process in Scala with PTY?


In ruby I have:

PTY.spawn("/usr/bin/lxc-monitor -n .+") do |i, o, pid|
  # ...
end

How do this in scala/java?


Solution

  • Try JPty or pty4j. These are implementations of pty for Java using JNA.