public class UnixProcessManager extends Object implements ProcessManager
ProcessManager implementation for *nix systems. Uses the ps and kill commands.
Works for Linux. Works for Solaris too, except that the command line string returned by ps there is limited
to 80 characters and this affects findPid(String).
| Modifier and Type | Field and Description |
|---|---|
protected static boolean |
PID_ENABLED |
| Constructor and Description |
|---|
UnixProcessManager() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canFindPid() |
String |
findPid(String regex) |
void |
kill(Process process,
String pid) |
protected String[] |
psCommand() |
protected static final boolean PID_ENABLED
public UnixProcessManager()
public String findPid(String regex) throws IOException
findPid in interface ProcessManagerIOExceptionpublic void kill(Process process, String pid) throws IOException
kill in interface ProcessManagerIOExceptionpublic boolean canFindPid()
canFindPid in interface ProcessManagerCopyright © 2019 Nuxeo. All rights reserved.