680
679
BOOL fEnabled = VbglR3PageSharingIsEnabled();
681
680
VBoxServiceVerbose(3, "VBoxServicePageSharingWorkerProcess: enabled=%d\n", fEnabled);
683
* Start a 2nd VBoxService process to deal with page fusion as we do
684
* not wish to dummy load dlls into this process. (First load with
685
* DONT_RESOLVE_DLL_REFERENCES, 2nd normal -> dll init routines not called!)
684
688
&& hProcess == NIL_RTPROCESS)
686
690
char szExeName[256];
690
pszExeName = RTProcGetExecutableName(szExeName, sizeof(szExeName));
691
char *pszExeName = RTProcGetExecutablePath(szExeName, sizeof(szExeName));
694
pszArgs[0] = pszExeName;
695
pszArgs[1] = "-pagefusionfork";
697
/* Start a 2nd VBoxService process to deal with page fusion as we do not wish to dummy load
698
* dlls into this process. (first load with DONT_RESOLVE_DLL_REFERENCES, 2nd normal -> dll init routines not called!)
700
rc = RTProcCreate(pszExeName, pszArgs, RTENV_DEFAULT, 0 /* normal child */, &hProcess);
701
if (rc != VINF_SUCCESS)
694
char const *papszArgs[3];
695
papszArgs[0] = pszExeName;
696
papszArgs[1] = "--pagefusionfork";
698
rc = RTProcCreate(pszExeName, papszArgs, RTENV_DEFAULT, 0 /* normal child */, &hProcess);
702
700
VBoxServiceError("VBoxServicePageSharingWorkerProcess: RTProcCreate %s failed; rc=%Rrc\n", pszExeName, rc);