public class ProcessTree extends Object
限定符和类型 | 类和说明 |
---|---|
static class |
ProcessTree.Signal
The constants for the signals.
|
限定符和类型 | 字段和说明 |
---|---|
static boolean |
isSetsidAvailable |
构造器和说明 |
---|
ProcessTree() |
限定符和类型 | 方法和说明 |
---|---|
static boolean |
isAlive(String pid)
Is the process with PID pid still alive?
|
static boolean |
isProcessGroupAlive(String pgrpId)
Is the process group with still alive?
|
static void |
killProcess(String pid,
ProcessTree.Signal signal)
Sends signal to process, forcefully terminating the process.
|
static void |
killProcessGroup(String pgrpId,
ProcessTree.Signal signal)
Sends signal to all process belonging to same process group,
forcefully terminating the process group.
|
public static void killProcess(String pid, ProcessTree.Signal signal)
pid
- process idsignal
- the signal number to sendpublic static void killProcessGroup(String pgrpId, ProcessTree.Signal signal)
pgrpId
- process group idsignal
- the signal number to sendpublic static boolean isAlive(String pid)
pid
- pid of the process to check.public static boolean isProcessGroupAlive(String pgrpId)
pgrpId
- process group idCopyright © 2009 The Apache Software Foundation