public class Kill extends Object
kill
utility.Modifier and Type | Method and Description |
---|---|
static void |
kill(int pid)
Sends an
Signal#SIGTERM to the given process. |
static void |
kill(int pid,
alluxio.hub.agent.util.process.Kill.Signal signal)
Sends the desired signal to a given process.
|
static void |
kill9(int pid)
Sends an
Signal#SIGKILL to the given process. |
public static void kill(int pid, alluxio.hub.agent.util.process.Kill.Signal signal) throws IOException, InterruptedException
pid
- the pid to send the signal tosignal
- the signal to sendIOException
- if kill couldn't complete successfullyInterruptedException
- when interrupted waiting for subprocess to finishpublic static void kill(int pid) throws IOException, InterruptedException
Signal#SIGTERM
to the given process.pid
- the pid to send the signal toIOException
- if kill couldn't send the signal properlyInterruptedException
- if we are interrupted waiting for the subprocess to finishkill(int, Signal)
public static void kill9(int pid) throws IOException, InterruptedException
Signal#SIGKILL
to the given process.pid
- the pid to send the signal toIOException
- if kill couldn't send the signal properlyInterruptedException
- if we are interrupted waiting for the subprocess to finishkill(int, Signal)
Copyright © 2023. All Rights Reserved.