ProcessPipeline

replpp.shaded.os.ProcessPipeline
class ProcessPipeline(val processes: Seq[SubProcess], pipefail: Boolean, brokenPipeQueue: Option[LinkedBlockingQueue[Int]]) extends ProcessLike

Attributes

Graph
Supertypes
trait ProcessLike
trait AutoCloseable
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

override def close(): Unit

Alias for destroy, implemented for java.lang.AutoCloseable.

Alias for destroy, implemented for java.lang.AutoCloseable.

Attributes

Definition Classes
ProcessLike -> AutoCloseable
def commandString: String

String representation of the pipeline.

String representation of the pipeline.

Attributes

override def destroy(): Unit

Attempt to destroy the ProcessPipeline (gently), via the underlying JVM APIs. All processes in the pipeline are destroyed.

Attempt to destroy the ProcessPipeline (gently), via the underlying JVM APIs. All processes in the pipeline are destroyed.

Attributes

Definition Classes
override def destroyForcibly(): Unit

Force-destroys the ProcessPipeline, via the underlying JVM APIs. All processes in the pipeline are force-destroyed.

Force-destroys the ProcessPipeline, via the underlying JVM APIs. All processes in the pipeline are force-destroyed.

Attributes

Definition Classes
override def exitCode(): Int

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

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

If pipefail is set, the exit code is the first non-zero exit code of the pipeline. If no process in the pipeline has a non-zero exit code, the exit code is 0.

Attributes

Definition Classes
override def isAlive(): Boolean

Returns true if the ProcessPipeline is still running and has not terminated. Any process in the pipeline can be alive for the pipeline to be alive.

Returns true if the ProcessPipeline is still running and has not terminated. Any process in the pipeline can be alive for the pipeline to be alive.

Attributes

Definition Classes
override def join(timeout: Long, timeoutGracePeriod: Long): Boolean

Wait up to timeout for the ProcessPipeline to terminate all the processes in pipeline. By default waits indefinitely; if a time limit is given, explicitly destroys each process if it has not completed by the time the timeout has occurred.

Wait up to timeout for the ProcessPipeline to terminate all the processes in pipeline. By default waits indefinitely; if a time limit is given, explicitly destroys each process if it has not completed by the time the timeout has occurred.

By default, the processes are destroyed by sending SIGTERM signals, which allows an opportunity for them to clean up any resources it. If any 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.

Definition Classes
override def waitFor(timeout: Long): Boolean

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

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

Waits for each process one by one, while aggregating the total time waited. If timeout has passed before all processes have terminated, returns false.

Attributes

Definition Classes

Concrete fields

val processes: Seq[SubProcess]