Index: /trunk/include/iprt/process.h
===================================================================
--- /trunk/include/iprt/process.h	(revision 35557)
+++ /trunk/include/iprt/process.h	(revision 35558)
@@ -194,4 +194,8 @@
  * introduced with Windows Vista. */
 #define RTPROC_FLAGS_SERVICE                RT_BIT(2)
+/** Suppress changing the process contract id for the child process
+ * on Solaris. Without this flag the contract id is always changed,
+ * as that's the more frequently used case. */
+#define RTPROC_FLAGS_SAME_CONTRACT          RT_BIT(3)
 /** @}  */
 
Index: /trunk/src/VBox/Runtime/r3/posix/process-creation-posix.cpp
===================================================================
--- /trunk/src/VBox/Runtime/r3/posix/process-creation-posix.cpp	(revision 35557)
+++ /trunk/src/VBox/Runtime/r3/posix/process-creation-posix.cpp	(revision 35558)
@@ -356,7 +356,11 @@
     {
 # ifdef RT_OS_SOLARIS
-        int templateFd = rtSolarisContractPreFork();
-        if (templateFd == -1)
-            return VERR_OPEN_FAILED;
+        int templateFd = -1;
+        if (!(fFlags & RTPROC_FLAGS_SAME_CONTRACT))
+        {
+            templateFd = rtSolarisContractPreFork();
+            if (templateFd == -1)
+                return VERR_OPEN_FAILED;
+        }
 # endif /* RT_OS_SOLARIS */
         pid = fork();
@@ -364,5 +368,6 @@
         {
 # ifdef RT_OS_SOLARIS
-            rtSolarisContractPostForkChild(templateFd);
+            if (!(fFlags & RTPROC_FLAGS_SAME_CONTRACT))
+                rtSolarisContractPostForkChild(templateFd);
 # endif /* RT_OS_SOLARIS */
             setsid(); /* see comment above */
@@ -374,5 +379,6 @@
         {
 #ifdef RT_OS_SOLARIS
-            rtSolarisContractPostForkParent(templateFd, pid);
+            if (!(fFlags & RTPROC_FLAGS_SAME_CONTRACT))
+                rtSolarisContractPostForkParent(templateFd, pid);
 #endif /* RT_OS_SOLARIS */
             if (pid > 0)
@@ -657,4 +663,7 @@
     /* Create new session, fix up the standard file descriptors and the
      * current working directory. */
+    /** @todo r=klaus the webservice uses this function and assumes that the
+     * contract id of the daemon is the same as that of the original process.
+     * Whenever this code is changed this must still remain possible. */
     pid_t newpgid = setsid();
     int SavedErrno = errno;
