org.artofsolving.jodconverter.process
Class LinuxProcessManager
java.lang.Object
org.artofsolving.jodconverter.process.LinuxProcessManager
- All Implemented Interfaces:
- ProcessManager
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(String)
.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LinuxProcessManager
public LinuxProcessManager()
setRunAsArgs
public void setRunAsArgs(String... runAsArgs)
psCommand
protected String[] psCommand()
findPid
public long findPid(ProcessQuery query)
throws IOException
- Specified by:
findPid
in interface ProcessManager
- Returns:
- the pid or
ProcessManager.PID_UNKNOWN
- Throws:
IOException
kill
public void kill(Process process,
long pid)
throws IOException
- Specified by:
kill
in interface ProcessManager
- Throws:
IOException
Copyright © 2003-2011. All Rights Reserved.