--- virtualbox-ose-4.0.4-dfsg.orig/src/VBox/Main/src-server/xpcom/server_module.cpp
+++ virtualbox-ose-4.0.4-dfsg/src/VBox/Main/src-server/xpcom/server_module.cpp
@@ -56,6 +56,14 @@
 
 #include <string.h>
 
+#if (defined(RT_OS_DARWIN) || defined(RT_OS_LINUX) || defined(RT_OS_SOLARIS) || defined(RT_OS_FREEBSD))
+#include <unistd.h>
+#define _CHDIR(x) chdir(x)
+#else
+#define _CHDIR(x)
+#endif
+
+
 #if defined(RT_OS_SOLARIS)
 # include <sys/systeminfo.h>
 #endif
@@ -125,6 +133,9 @@
     PR_ProcessAttrSetStdioRedirect(attr, PR_StandardOutput, devNull);
     PR_ProcessAttrSetStdioRedirect(attr, PR_StandardError, devNull);
 
+    // don't keep open descriptors on the startup dir while the client runs
+    _CHDIR("/");
+
     if (PR_CreateProcessDetached(VBoxSVCPath, args, nsnull, attr) != PR_SUCCESS)
         goto end;
 
