Static functions for retrieving information about the running process.
More...
#include <Process.h>
|
static pid_t | GetID () |
| Get this process ID (PID) More...
|
|
static pid_t | GetParentID () |
| Get the parent's process ID. More...
|
|
static std::string | GetCommandLine (pid_t pid=-1) |
| Retrieve the command line of the process with the specified PID, or of this calling process if PID is -1 (which is the default). More...
|
|
static std::string | GetExecutablePath (pid_t pid=-1) |
| Retrieve the absolute path of the process with the specified PID, or of this calling process if PID is -1 (which is the default). More...
|
|
static std::string | GetExecutableDir (pid_t pid=-1) |
| Retrieve the directory that the process executable resides in. More...
|
|
static std::string | GetWorkingDir (pid_t pid=-1) |
| Retrieve the current working directory of the process. More...
|
|
static void | Fork () |
| Duplicate the calling process. More...
|
|
Static functions for retrieving information about the running process.
◆ Fork()
static void Process::Fork |
( |
| ) |
|
|
static |
Duplicate the calling process.
◆ GetCommandLine()
static std::string Process::GetCommandLine |
( |
pid_t |
pid = -1 | ) |
|
|
static |
Retrieve the command line of the process with the specified PID, or of this calling process if PID is -1 (which is the default).
◆ GetExecutableDir()
static std::string Process::GetExecutableDir |
( |
pid_t |
pid = -1 | ) |
|
|
static |
Retrieve the directory that the process executable resides in.
For example, if the process executable is located at /usr/bin/exe
, then GetExecutableDir()
would return the path /usr/bin
. If the specified PID is -1, then the calling process will be used.
◆ GetExecutablePath()
static std::string Process::GetExecutablePath |
( |
pid_t |
pid = -1 | ) |
|
|
static |
Retrieve the absolute path of the process with the specified PID, or of this calling process if PID is -1 (which is the default).
This path will include the process' filename.
◆ GetID()
static pid_t Process::GetID |
( |
| ) |
|
|
static |
Get this process ID (PID)
◆ GetParentID()
static pid_t Process::GetParentID |
( |
| ) |
|
|
static |
Get the parent's process ID.
◆ GetWorkingDir()
static std::string Process::GetWorkingDir |
( |
pid_t |
pid = -1 | ) |
|
|
static |
Retrieve the current working directory of the process.
If the specified PID is -1, then the calling process will be used.
The documentation for this class was generated from the following file: