ProcessTree
.@Deprecated public final class ProcessTreeKiller extends Object
Constructor and Description |
---|
ProcessTreeKiller()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
static EnvVars |
createCookie()
Deprecated.
|
static ProcessTreeKiller |
get()
Deprecated.
Gets the
ProcessTreeKiller suitable for the current system
that JVM runs in, or in the worst case return the default one
that's not capable of killing descendants at all. |
void |
kill(Map<String,String> modelEnvVars)
Deprecated.
|
void |
kill(Process proc)
Deprecated.
|
void |
kill(Process proc,
Map<String,String> modelEnvVars)
Deprecated.
|
@Deprecated public void kill(Process proc) throws InterruptedException
ProcessTree.OSProcess.killRecursively()
kill(proc,null)
InterruptedException
@Deprecated public void kill(Process proc, Map<String,String> modelEnvVars) throws InterruptedException
ProcessTree.killAll(Map)
and ProcessTree.OSProcess.killRecursively()
kill(Process)
does, also tries to
kill all the daemon processes launched.
Kills the given process (like Process.destroy()
but also attempts to kill descendant processes created from the given
process.
In addition, optionally perform "search and destroy" based on environment variables. In this method, the method is given a "model environment variables", which is a list of environment variables and their values that are characteristic to the launched process. The implementation is expected to find processes in the system that inherit these environment variables, and kill them all. This is suitable for locating daemon processes that cannot be tracked by the regular ancestor/descendant relationship.
The implementation is obviously OS-dependent.
proc
- Process to be killed recursively. Can be null.modelEnvVars
- If non-null, search-and-destroy will be performed.InterruptedException
@Deprecated public void kill(Map<String,String> modelEnvVars) throws InterruptedException
ProcessTree.killAll(Map)
kill(null,modelEnvVars)
InterruptedException
@Deprecated public static EnvVars createCookie()
EnvVars.createCookie()
public static ProcessTreeKiller get()
ProcessTreeKiller
suitable for the current system
that JVM runs in, or in the worst case return the default one
that's not capable of killing descendants at all.Copyright © 2004–2019. All rights reserved.