Changeset 35558 in vbox
- Timestamp:
- Jan 14, 2011 1:30:33 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
-
include/iprt/process.h (modified) (1 diff)
-
src/VBox/Runtime/r3/posix/process-creation-posix.cpp (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/process.h
r34708 r35558 194 194 * introduced with Windows Vista. */ 195 195 #define RTPROC_FLAGS_SERVICE RT_BIT(2) 196 /** Suppress changing the process contract id for the child process 197 * on Solaris. Without this flag the contract id is always changed, 198 * as that's the more frequently used case. */ 199 #define RTPROC_FLAGS_SAME_CONTRACT RT_BIT(3) 196 200 /** @} */ 197 201 -
trunk/src/VBox/Runtime/r3/posix/process-creation-posix.cpp
r34708 r35558 356 356 { 357 357 # ifdef RT_OS_SOLARIS 358 int templateFd = rtSolarisContractPreFork(); 359 if (templateFd == -1) 360 return VERR_OPEN_FAILED; 358 int templateFd = -1; 359 if (!(fFlags & RTPROC_FLAGS_SAME_CONTRACT)) 360 { 361 templateFd = rtSolarisContractPreFork(); 362 if (templateFd == -1) 363 return VERR_OPEN_FAILED; 364 } 361 365 # endif /* RT_OS_SOLARIS */ 362 366 pid = fork(); … … 364 368 { 365 369 # ifdef RT_OS_SOLARIS 366 rtSolarisContractPostForkChild(templateFd); 370 if (!(fFlags & RTPROC_FLAGS_SAME_CONTRACT)) 371 rtSolarisContractPostForkChild(templateFd); 367 372 # endif /* RT_OS_SOLARIS */ 368 373 setsid(); /* see comment above */ … … 374 379 { 375 380 #ifdef RT_OS_SOLARIS 376 rtSolarisContractPostForkParent(templateFd, pid); 381 if (!(fFlags & RTPROC_FLAGS_SAME_CONTRACT)) 382 rtSolarisContractPostForkParent(templateFd, pid); 377 383 #endif /* RT_OS_SOLARIS */ 378 384 if (pid > 0) … … 657 663 /* Create new session, fix up the standard file descriptors and the 658 664 * current working directory. */ 665 /** @todo r=klaus the webservice uses this function and assumes that the 666 * contract id of the daemon is the same as that of the original process. 667 * Whenever this code is changed this must still remain possible. */ 659 668 pid_t newpgid = setsid(); 660 669 int SavedErrno = errno;
Note:
See TracChangeset
for help on using the changeset viewer.

