I just had a look at the new scala.sys
and scala.sys.process
packages to see if there is something helpful here. However, I am at a complete loss.<
Has anybody got an example on how to actually start a process?
import sys.process._ // Package object with implicits!
"ls"!
And, which is most interesting for me: Can you detach processes?
"/path/to/script.sh".run()
Most of what you'll do is related to sys.process.ProcessBuilder
, the trait. Get to know that.
There are implicits that make usage less verbose, and they are available through the package object sys.process
. Import its contents, like shown in the examples. Also, take a look at its scaladoc as well.