9#ifndef HPP_ALIB_LANG_SYSTEM_PROCESSINFO
10#define HPP_ALIB_LANG_SYSTEM_PROCESSINFO 1
16namespace alib {
namespace lang::system {
53 #if defined( __unix__ ) || DOXYGEN
71 #if defined( __APPLE__ )
78 #if defined( _WIN32 ) || DOXYGEN
96 #if defined( __unix__ )
120 #if defined( __unix__ ) || defined(__APPLE__)
This class represents process information.
ALIB_API bool Get(uinteger processID)
AString CmdLine
The command line which invoked this process.
AString ConsoleTitle
For console processes, this is the title displayed in the title bar. (Windows OS only....
ProcessInfo()
Default constructor to create an empty instance.
bool getStatField(int fieldNo, AString &target)
AString ExecFilePath
The path of the executable (if available to us).
static ALIB_API const ProcessInfo & Current()
uinteger PID
The process id as AString.
ALIB_API bool get(uinteger PID)
AString Stat
The contents of /proc/PID/stat file. (Unix like OS only.)
AString StatState
The state field (2) within Stat. (Unix like OS only.)
AString StatPGRP
The process group field (4) within Stat. (Unix like OS only.)
ProcessInfo(uinteger processID)
uinteger PPID
The parent's process id as AString. (Unix like OS / Mac OS only.)
static ALIB_API ProcessInfo current
#define ALIB_ASSERT_MODULE(modulename)
platform_specific uinteger