ProcessLike

replpp.shaded.os.ProcessLike
sealed trait ProcessLike extends AutoCloseable

Parent type for single processes and process pipelines.

Attributes

Graph
Supertypes
trait AutoCloseable
class Object
trait Matchable
class Any
Known subtypes

Members list

Value members

Abstract methods

override def close(): Unit

Alias for destroy, implemented for java.lang.AutoCloseable

Alias for destroy, implemented for java.lang.AutoCloseable

Attributes

Definition Classes
AutoCloseable
def destroy(): Unit

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

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

Attributes

def destroyForcibly(): Unit

Force-destroys the ProcessLike, via the underlying JVM APIs

Force-destroys the ProcessLike, via the underlying JVM APIs

Attributes

def exitCode(): Int

The exit code of this ProcessLike. Conventionally, 0 exit code represents a successful termination, and non-zero exit code indicates a failure.

The exit code of this ProcessLike. 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

Attributes

def isAlive(): Boolean

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

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

Attributes

def waitFor(timeout: Long): Boolean

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

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

Attributes

Concrete methods

def join(timeout: Long, timeoutGracePeriod: Long): Boolean

Wait up to millis for the ProcessLike 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 ProcessLike if it has not completed by the time the timeout has occurred.

Wait up to millis for the ProcessLike 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 ProcessLike if it has not completed by the time the timeout has occurred.

By default, a process is destroyed by sending a SIGTERM signal, which allows an opportunity for it to clean up any resources it was using. If the process is unresponsive to this, a SIGKILL signal is sent timeoutGracePeriod milliseconds later. If timeoutGracePeriod is 0, then there is no SIGTERM; if it is -1, there is no SIGKILL sent.

Attributes

Note

the issuing of SIGTERM instead of SIGKILL is implementation dependent on your JVM version. Pre-Java 9, no SIGTERM may be issued. Check the documentation for your JDK's Process.destroy.