Class PosixProcess
java.lang.Object
com.aoindustries.aoserv.daemon.posix.PosixProcess
- Direct Known Subclasses:
LinuxProcess
A
PosixProcess
represents a process
running on any POSIX machine.- Author:
- AO Industries, Inc.
-
Field Summary
-
Constructor Summary
ModifierConstructorDescriptionprotected
PosixProcess
(int pid) Constructs a POSIX process given its process ID. -
Method Summary
-
Field Details
-
pid
protected int pid
-
-
Constructor Details
-
PosixProcess
protected PosixProcess(int pid) Constructs a POSIX process given its process ID.
-
-
Method Details
-
getGid
Determines the group ID of a process. The subclasses ofPosixProcess
must implement this functionality. Calling the method on aPosixProcess
will result in anIOException
.- Throws:
IOException
-
getUid
Determines the user ID of a process. The subclasses ofPosixProcess
must implement this functionality. Calling the method on aPosixProcess
will result in anIOException
.- Throws:
IOException
-
isRunning
Determines if the process is currently running. The subclasses ofPosixProcess
must implement this functionality. Calling the method on aPosixProcess
will result in anIOException
.- Throws:
IOException
-
killProc
Kills this process. Sends a term signal once, waits two seconds, then sends a kill signal. The signals are sent to the execution of the/bin/kill
executable.- Throws:
IOException
InterruptedException
-
signal
Sends a signal to this process. The signals are sent to the execution of the/bin/kill
executable.- Throws:
IOException
-