RSC
0.13.4
|
These functions are not guaranteed to be either thread-safe or reentrant. More...
Typedefs | |
typedef unsigned int | rsc::os::PID |
Functions | |
PID | rsc::os::currentProcessId () |
Return the id the current process. More... | |
std::string | rsc::os::getProgramName (PID pid) |
Return the name of the program executed in the process designated by pid. More... | |
std::string | rsc::os::currentProgramName () |
Return the name of the program executed in the current process. More... | |
std::string | rsc::os::getExecutablePath (PID pid) |
Return the absolute path of the executable file that is executed in the process designated by pid. More... | |
std::string | rsc::os::currentExecutablePath () |
Return the absolute path of the executable file that is executed in the current process. More... | |
std::vector< std::string > | rsc::os::getCommandlineArguments (PID pid) |
Return the list of commandline arguments of the process designated by pid. More... | |
std::vector< std::string > | rsc::os::currentCommandlineArguments () |
Return the list of commandline arguments of the current process. More... | |
boost::posix_time::ptime | rsc::os::getProcessStartTime (PID pid) |
Return the start time of the process designated by pid. More... | |
boost::posix_time::ptime | rsc::os::currentProcessStartTime () |
Return the start time of the current process. More... | |
std::string | rsc::os::getExecutingUser (PID pid) |
Return login- or account-name of the user executing pid. More... | |
std::string | rsc::os::currentExecutingUser () |
Return the login- or account-name of the user executing the current process. More... | |
These functions are not guaranteed to be either thread-safe or reentrant.
typedef unsigned int rsc::os::PID |
Definition at line 47 of file ProcessInfo.h.
std::vector< std::string > rsc::os::currentCommandlineArguments | ( | ) |
Return the list of commandline arguments of the current process.
std::runtime_error | If the commandline arguments cannot be determined. |
Definition at line 147 of file LinuxProcessInfo.cpp.
References rsc::os::currentProcessId(), and rsc::os::getCommandlineArguments().
Referenced by rsc::os::DeleteHandle::operator()().
std::string rsc::os::currentExecutablePath | ( | ) |
Return the absolute path of the executable file that is executed in the current process.
std::runtime_error | If the executable path cannot be determined. |
Definition at line 124 of file LinuxProcessInfo.cpp.
References rsc::os::currentProcessId(), and rsc::os::getExecutablePath().
std::string rsc::os::currentExecutingUser | ( | ) |
Return the login- or account-name of the user executing the current process.
std::runtime_error | If determining the executing user fails. |
Definition at line 232 of file LinuxProcessInfo.cpp.
References rsc::os::uidToName().
Referenced by rsc::os::DeleteHandle::operator()().
PID rsc::os::currentProcessId | ( | ) |
Return the id the current process.
std::runtime_error | If the process id cannot be determined. |
Definition at line 55 of file LinuxProcessInfo.cpp.
Referenced by rsc::os::currentCommandlineArguments(), rsc::os::currentExecutablePath(), rsc::os::currentProcessStartTime(), rsc::os::currentProgramName(), and rsc::os::DeleteHandle::operator()().
boost::posix_time::ptime rsc::os::currentProcessStartTime | ( | ) |
Return the start time of the current process.
The precision with which the start time can be determined varies between platforms.
std::runtime_error | If determining the start time fails. |
Definition at line 200 of file LinuxProcessInfo.cpp.
References rsc::os::currentProcessId(), and rsc::os::getProcessStartTime().
Referenced by rsc::os::DeleteHandle::operator()().
std::string rsc::os::currentProgramName | ( | ) |
Return the name of the program executed in the current process.
std::runtime_error | If the program name cannot be determined. |
Definition at line 105 of file LinuxProcessInfo.cpp.
References rsc::os::currentProcessId(), and rsc::os::getProgramName().
std::vector< std::string > rsc::os::getCommandlineArguments | ( | PID | pid | ) |
Return the list of commandline arguments of the process designated by pid.
pid | The id of the process for which the program name should be returned. |
std::runtime_error | If the commandline arguments cannot be determined. |
Definition at line 128 of file LinuxProcessInfo.cpp.
References rsc::os::getCommandlineComponents().
Referenced by rsc::os::currentCommandlineArguments(), and rsc::os::DeleteHandle::operator()().
std::string rsc::os::getExecutablePath | ( | PID | pid | ) |
Return the absolute path of the executable file that is executed in the process designated by pid.
pid | The id of the process for which the program name should be returned. |
std::runtime_error | If the executable path cannot be determined. |
Definition at line 109 of file LinuxProcessInfo.cpp.
References rsc::os::getProgramName(), and rsc::os::procFilename().
Referenced by rsc::os::currentExecutablePath().
std::string rsc::os::getExecutingUser | ( | PID | pid | ) |
Return login- or account-name of the user executing pid.
pid | The id of the process for which the executing user should be returned. |
std::runtime_error | If determining the executing user fails. |
Definition at line 210 of file LinuxProcessInfo.cpp.
References rsc::os::procFilename(), and rsc::os::uidToName().
Referenced by rsc::os::DeleteHandle::operator()().
boost::posix_time::ptime rsc::os::getProcessStartTime | ( | PID | pid | ) |
Return the start time of the process designated by pid.
The precision with which the start time can be determined varies between platforms.
pid | The id of the process for which the start time should be returned. |
std::runtime_error | If determining the start time fails. |
Definition at line 157 of file LinuxProcessInfo.cpp.
References rsc::os::currentBootTime(), and rsc::os::procFilename().
Referenced by rsc::os::currentProcessStartTime(), and rsc::os::DeleteHandle::operator()().
std::string rsc::os::getProgramName | ( | PID | pid | ) |
Return the name of the program executed in the process designated by pid.
pid | The id of the process for which the program name should be returned. |
std::runtime_error | If the program name cannot be determined. |
Definition at line 89 of file LinuxProcessInfo.cpp.
References rsc::os::getCommandlineComponents().
Referenced by rsc::os::currentProgramName(), and rsc::os::getExecutablePath().