|
Safir SDK Core
|
#include <Safir/Utilities/ProcessInfo.h>
Public Member Functions | |
| ProcessInfo (const pid_t pid) | |
| Create a ProcessInfo object for a specific process. | |
| ~ProcessInfo () | |
| Destructor. | |
| const std::string | GetProcessName () const |
| This method will probably return argv[0] of the process. | |
Static Public Member Functions | |
| static pid_t | GetPid () |
| Returns the pid of the current process. | |
| static const std::string | GetProcessDescription () |
| This method will probably return the command line used to start the current process. | |
| Safir::Utilities::ProcessInfo::ProcessInfo | ( | const pid_t | pid | ) |
Create a ProcessInfo object for a specific process.
Referenced by GetProcessDescription().
| Safir::Utilities::ProcessInfo::~ProcessInfo | ( | ) |
Destructor.
|
static |
Returns the pid of the current process.
|
static |
This method will probably return the command line used to start the current process.
At the very least it will return the pid as a string.
References ProcessInfo().
| const std::string Safir::Utilities::ProcessInfo::GetProcessName | ( | ) | const |
This method will probably return argv[0] of the process.
At the very least it will return the pid as a string. Be sure not to use this as a unique identifier for processes. For java processes it attempts to find the name of the running jar, and for mono processes it attempts to find the name of the running exe. No guarantees at all!