Represents a spawn subprocess that has started and may or may not have completed.
Attributes
- Companion
- object
- Graph
-
- Supertypes
Members list
Value members
Constructors
Concrete methods
Attempt to destroy the subprocess (gently), via the underlying JVM APIs
Attempt to destroy the subprocess (gently), via the underlying JVM APIs
Attributes
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:
Value parameters
- async
-
set this to
true
if you do not want to wait on the subprocess exiting - 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.
Attributes
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
Attributes
Returns true
if the subprocess is still running and has not terminated
Returns true
if the subprocess is still running and has not terminated
Attributes
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.
Attributes
Deprecated methods
Force-destroys the ProcessLike, via the underlying JVM APIs
Inherited methods
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 ofSIGKILL
is implementation dependent on your JVM version. Pre-Java 9, noSIGTERM
may be issued. Check the documentation for your JDK'sProcess.destroy
. - Inherited from:
- ProcessLike