public class LinuxProcessManager extends Object implements ProcessManager
ProcessManager implementation for Linux. Uses the ps and kill commands.
Should Work on Solaris too, except that the command line string returned by ps there is limited to 80
characters and this affects findPid(ProcessQuery).
PID_NOT_FOUND, PID_UNKNOWN| Constructor and Description |
|---|
LinuxProcessManager() |
| Modifier and Type | Method and Description |
|---|---|
long |
findPid(ProcessQuery query) |
void |
kill(Process process,
long pid) |
protected String[] |
psCommand() |
void |
setRunAsArgs(String... runAsArgs) |
public void setRunAsArgs(String... runAsArgs)
protected String[] psCommand()
public long findPid(ProcessQuery query) throws IOException
findPid in interface ProcessManagerProcessManager.PID_NOT_FOUND if not, or ProcessManager.PID_UNKNOWN if this implementation is unable
to find outIOExceptionpublic void kill(Process process, long pid) throws IOException
kill in interface ProcessManagerIOExceptionCopyright © 2003–2016 XWiki. All rights reserved.