#include <processinfo.hpp>
Public Static Method Index: | |
static ALIB_API const ProcessInfo & | Current () |
Public Field Index: | |
AString | CmdLine |
AString | ConsoleTitle |
AString | ExecFileName |
AString | ExecFilePath |
AString | Name |
uinteger | PID |
uinteger | PPID |
AString | Stat |
AString | StatPGRP |
AString | StatState |
Public Method Index: | |
ProcessInfo (uinteger processID) | |
ALIB_API bool | Get (uinteger processID) |
AString CmdLine |
The command line which invoked this process.
Definition at line 38 of file processinfo.hpp.
AString ConsoleTitle |
For console processes, this is the title displayed in the title bar. (Windows OS only.)
Definition at line 85 of file processinfo.hpp.
|
staticprotected |
Information on the current process. This is initialized once, with the first invocation of Current.
Definition at line 31 of file processinfo.hpp.
AString ExecFileName |
The file name of the executable (excluding ExecFilePath). Under GNU/Linux, if we have no access to read that value, field ExecFilePath will be empty while this field is filled with Name.
Definition at line 51 of file processinfo.hpp.
AString ExecFilePath |
The path of the executable (if available to us).
Definition at line 45 of file processinfo.hpp.
AString Name |
The name of the process.
Under GNU/Linux this is read from /proc/nnn/stat and may differ from ExecFileName. Under Windows OS, it is he same as field ExecFileName.
Definition at line 42 of file processinfo.hpp.
uinteger PID |
The process id as AString.
Definition at line 35 of file processinfo.hpp.
uinteger PPID |
The parent's process id as AString. (Unix like OS / Mac OS only.)
Definition at line 59 of file processinfo.hpp.
AString Stat |
The contents of /proc/PID/stat file. (Unix like OS only.)
Definition at line 62 of file processinfo.hpp.
AString StatPGRP |
The process group field (4) within Stat. (Unix like OS only.)
Definition at line 68 of file processinfo.hpp.
AString StatState |
The state field (2) within Stat. (Unix like OS only.)
Definition at line 65 of file processinfo.hpp.
|
inlineprotected |
|
inline |
Constructor that initializes this instance according to the process information received from the system.
processID | The ID of the process information is requested on. If a nulled string is provided, the current process is addressed. |
Definition at line 137 of file processinfo.hpp.
|
static |
Static method that receives information on the current process.
ProcessInfo
object representing the current process. Definition at line 51 of file processinfo.cpp.
|
protected |
Internal get() method with different platform implementations.
PID | The ID of the process information is requested on. If a nulled string is provided, the current process is addressed. |
true
on success, false
otherwise. Definition at line 207 of file processinfo.cpp.
Fills the fields of this instance according to the process information received from the system.
processID | The ID of the process information is requested on. If a nulled string is provided, the current process is addressed. |
true
on success, false
otherwise. Definition at line 154 of file processinfo.hpp.
|
protected |
Reads a field from the data found in /proc/PID/stat.
fieldNo | The field number to read |
target | The variable to store the result in |
true
if successful.