Ticket #8686: chdir_to_root.diff
| File chdir_to_root.diff, 828 bytes (added by , 13 years ago) |
|---|
-
src/VBox/Main/src-server/xpcom/server_module.cpp
old new 56 56 57 57 #include <string.h> 58 58 59 #if (defined(RT_OS_DARWIN) || defined(RT_OS_LINUX) || defined(RT_OS_SOLARIS) || defined(RT_OS_FREEBSD)) 60 #include <unistd.h> 61 #define _CHDIR(x) chdir(x) 62 #else 63 #define _CHDIR(x) 64 #endif 65 66 59 67 #if defined(RT_OS_SOLARIS) 60 68 # include <sys/systeminfo.h> 61 69 #endif … … 125 133 PR_ProcessAttrSetStdioRedirect(attr, PR_StandardOutput, devNull); 126 134 PR_ProcessAttrSetStdioRedirect(attr, PR_StandardError, devNull); 127 135 136 // don't keep open descriptors on the startup dir while the client runs 137 _CHDIR("/"); 138 128 139 if (PR_CreateProcessDetached(VBoxSVCPath, args, nsnull, attr) != PR_SUCCESS) 129 140 goto end; 130 141

