public class ProcessHelper extends Object
Constructor and Description |
---|
ProcessHelper() |
Modifier and Type | Method and Description |
---|---|
static Thread |
addShutdownHook(Process process)
Adds a shutdown hook for the process.
|
static int |
destroyProcess(Process process)
Destroys the process if the process is not
null . |
static boolean |
processHasDied(Process process)
Checks to see if the process has died.
|
public static boolean processHasDied(Process process)
process
- the process to checktrue
if the process has died, otherwise false
public static int destroyProcess(Process process) throws InterruptedException
null
.process
- the process to destroy, terminateInterruptedException
public static Thread addShutdownHook(Process process)
process
- the process to add a shutdown hook forSecurityException
- If a security manager is present and it denies RuntimePermission("shutdownHooks")
Copyright © 2023 JBoss by Red Hat. All rights reserved.