SubProcess

class SubProcess(val wrapped: Process, val inputPumperThread: Option[Thread], val outputPumperThread: Option[Thread], val errorPumperThread: Option[Thread]) extends AutoCloseable

Represents a spawn subprocess that has started and may or may not have completed.

Companion:
object
trait AutoCloseable
class Object
trait Matchable
class Any

Value members

Concrete methods

def close(): Unit

Alias for destroy

Alias for destroy

def destroy(): Unit

Attempt to destroy the subprocess (gently), via the underlying JVM APIs

Attempt to destroy the subprocess (gently), via the underlying JVM APIs

def destroyForcibly(): Unit

Force-destroys the subprocess, via the underlying JVM APIs

Force-destroys the subprocess, via the underlying JVM APIs

def exitCode(): Int

The subprocess' exit code. Conventionally, 0 exit code represents a successful termination, and non-zero exit code indicates a failure.

The subprocess' exit code. Conventionally, 0 exit code represents a successful termination, and non-zero exit code indicates a failure.

Throws an exception if the subprocess has not terminated

def isAlive(): Boolean

Returns true if the subprocess is still running and has not terminated

Returns true if the subprocess is still running and has not terminated

def join(timeout: Long): Boolean

Wait up to millis for the subprocess to terminate and all stdout and stderr from the subprocess to be handled. By default waits indefinitely; if a time limit is given, explicitly destroys the subprocess if it has not completed by the time the timeout has occurred

Wait up to millis for the subprocess to terminate and all stdout and stderr from the subprocess to be handled. By default waits indefinitely; if a time limit is given, explicitly destroys the subprocess if it has not completed by the time the timeout has occurred

def waitFor(timeout: Long): Boolean

Wait up to millis for the subprocess to terminate, by default waits indefinitely. Returns true if the subprocess has terminated by the time this method returns.

Wait up to millis for the subprocess to terminate, by default waits indefinitely. Returns true if the subprocess has terminated by the time this method returns.

Concrete fields

val errorPumperThread: Option[Thread]
val inputPumperThread: Option[Thread]
val outputPumperThread: Option[Thread]
val wrapped: Process