Changeset 3888 in vbox for trunk/src/VBox/Runtime/r3/posix/process-posix.cpp
- Timestamp:
- Jul 26, 2007 4:26:39 PM (18 years ago)
- svn:sync-xref-src-repo-rev:
- 23258
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r3/posix/process-posix.cpp
r3672 r3888 237 237 * files and code for this. 238 238 */ 239 #if defined(RT_OS_LINUX) || defined(RT_OS_FREEBSD) 239 #if defined(RT_OS_LINUX) || defined(RT_OS_FREEBSD) || defined(RT_OS_SOLARIS) 240 240 # ifdef RT_OS_LINUX 241 241 int cchLink = readlink("/proc/self/exe", pszExecName, cchExecName - 1); 242 # else 242 # elif defined(RT_OS_SOLARIS) 243 char szFileBuf[80]; 244 RTStrPrintf(szFileBuf, sizeof(szFileBuf), "/proc/%ld/path/a.out", (long)getpid()); 245 int cchLink = readlink(szFileBuf, pszExecName, cchExecName - 1); 246 # else 243 247 int cchLink = readlink("/proc/curproc/file", pszExecName, cchExecName - 1); 244 # endif 248 # endif 245 249 if (cchLink > 0 && (size_t)cchLink <= cchExecName - 1) 246 250 {
Note:
See TracChangeset
for help on using the changeset viewer.