Sys.Process
eff ProcessSourceAn effect used to start a process outside the JVM.
Operations
def execWithCwdAndEnv(cmd: String, args: List[String], cwd: Option[String], env: Map[String, String]): Result[IoError, ProcessHandle] \ Process
SourceImmediately executes the command cmd with the arguments args, by the path cwd and with the environment env.
def exitValue(ph: ProcessHandle): Result[IoError, Int32] \ Process
SourceReturns the exit value of the process ph.
def isAlive(ph: ProcessHandle): Result[IoError, Bool] \ Process
SourceReturns whether the process ph is alive.
def pid(ph: ProcessHandle): Result[IoError, Int64] \ Process
SourceReturns the PID of the process ph.
def stderr(ph: ProcessHandle): Result[IoError, StdErr] \ Process
SourceReturns the stderr stream of the process ph.
def stdin(ph: ProcessHandle): Result[IoError, StdIn] \ Process
SourceReturns the stdin stream of the process ph.
def stdout(ph: ProcessHandle): Result[IoError, StdOut] \ Process
SourceReturns the stdout stream of the process ph.
def stop(ph: ProcessHandle): Result[IoError, Unit] \ Process
SourceStops the process ph.
def waitFor(ph: ProcessHandle): Result[IoError, Int32] \ Process
SourceWaits for the process ph to finish and returns its exit value.
def waitForTimeout(ph: ProcessHandle, time: Int64, tUnit: TimeUnit): Result[IoError, Bool] \ Process
SourceWaits at most time (in the given tUnit) for the process ph to finish.
Returns true if the process exited, false if the timeout elapsed.
Definitions
def exec(cmd: String, args: List[String]): Result[IoError, ProcessHandle] \ Process
SourceExecutes the command cmd with the arguments args.
def execWithCwd(cmd: String, args: List[String], cwd: Option[String]): Result[IoError, ProcessHandle] \ Process
SourceExecutes the command cmd with the arguments args, by the path cwd.
def execWithEnv(cmd: String, args: List[String], env: Map[String, String]): Result[IoError, ProcessHandle] \ Process
SourceExecutes the command cmd with the arguments args and with the environmental env.
def handle(f: a -> b \ ef): a -> b \ (ef - Process) + IO
SourceHandles the Process effect of the given function f.
In other words, re-interprets the Process effect using the IO effect.
@DefaultHandler def runWithIO(f: Unit -> a \ ef): a \ (ef - Process) + IO
SourceRuns the Process effect of the given function f.
In other words, re-interprets the Process effect using the IO effect.