class SubProcess extends ProcessLike

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

Annotations
@deprecatedInheritance( ... , "0.10.4" )
Linear Supertypes
ProcessLike, AutoCloseable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. SubProcess
  2. ProcessLike
  3. AutoCloseable
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new SubProcess(wrapped: Process, inputPumperThread: Option[Thread], outputPumperThread: Option[Thread], errorPumperThread: Option[Thread])
  2. new SubProcess(wrapped: Process, inputPumperThread: Option[Thread], outputPumperThread: Option[Thread], errorPumperThread: Option[Thread], shutdownGracePeriod: Long, shutdownHookMonitorThread: Option[Thread])

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native() @HotSpotIntrinsicCandidate()
  6. def close(): Unit

    Alias for destroy

    Alias for destroy

    Definition Classes
    SubProcessProcessLike → AutoCloseable
  7. def destroy(shutdownGracePeriod: Long = this.shutdownGracePeriod, async: Boolean = false): Unit

    Destroys the subprocess, via the underlying JVM APIs, with configurable levels of aggressiveness:

    Destroys the subprocess, via the underlying JVM APIs, with configurable levels of aggressiveness:

    shutdownGracePeriod

    use this to override the default wait time for the subprocess to gracefully exit before destroying it forcibly. Defaults to the shutdownGracePeriod that was used to spawned the process, but can be set to 0 (i.e. force exit immediately) or -1 (i.e. never force exit) or anything in between. Typically defaults to 100 milliseconds.

    async

    set this to true if you do not want to wait on the subprocess exiting

  8. 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

    Definition Classes
    SubProcessProcessLike
  9. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  10. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  11. val errorPumperThread: Option[Thread]
  12. def exitCode(): Int

    The subprocess' exit code.

    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

    Definition Classes
    SubProcessProcessLike
  13. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  14. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  15. val inputPumperThread: Option[Thread]
  16. 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

    Definition Classes
    SubProcessProcessLike
  17. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  18. def join(timeout: Long = -1, timeoutGracePeriod: Long = 100): Boolean

    Wait up to millis for the ProcessLike to terminate and all stdout and stderr from the subprocess to be handled.

    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.

    Definition Classes
    ProcessLike
    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.

  19. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  20. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  21. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  22. val outputPumperThread: Option[Thread]
  23. val shutdownGracePeriod: Long
  24. val shutdownHookMonitorThread: Option[Thread]
  25. val stderr: OutputStream
  26. val stdin: InputStream
  27. val stdout: OutputStream
  28. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  29. def toString(): String
    Definition Classes
    AnyRef → Any
  30. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  31. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  32. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  33. def waitFor(timeout: Long = -1): Boolean

    Wait up to millis for the subprocess to terminate, by default waits indefinitely.

    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.

    Definition Classes
    SubProcessProcessLike
  34. val wrapped: Process

Deprecated Value Members

  1. def destroyForcibly(): Unit

    Force-destroys the ProcessLike, via the underlying JVM APIs

    Force-destroys the ProcessLike, via the underlying JVM APIs

    Definition Classes
    SubProcessProcessLike
    Annotations
    @deprecated
    Deprecated

    Use destroy(shutdownGracePeriod = 0)

  2. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] ) @Deprecated
    Deprecated

Inherited from ProcessLike

Inherited from AutoCloseable

Inherited from AnyRef

Inherited from Any

Ungrouped