diff options
Diffstat (limited to 'qpid/cpp/src')
-rwxr-xr-x | qpid/cpp/src/qpid/sys/posix/SystemInfo.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/qpid/cpp/src/qpid/sys/posix/SystemInfo.cpp b/qpid/cpp/src/qpid/sys/posix/SystemInfo.cpp index 5d9eda605d..db3b48e6fe 100755 --- a/qpid/cpp/src/qpid/sys/posix/SystemInfo.cpp +++ b/qpid/cpp/src/qpid/sys/posix/SystemInfo.cpp @@ -107,14 +107,12 @@ uint32_t SystemInfo::getParentProcessId() return (uint32_t) ::getppid(); } +// Linux specific (Solaris has quite different stuff in /proc) string SystemInfo::getProcessName() { - uint32_t pid = getProcessId(); string value; - stringstream pathStream; - pathStream << "/proc/" << pid << "/status"; - ifstream input(pathStream.str().c_str()); + ifstream input("/proc/self/status"); if (input.good()) { while (!input.eof()) { string key; |