VirtualBox

Changeset 33854 in vbox


Ignore:
Timestamp:
Nov 8, 2010 3:20:57 PM (14 years ago)
Author:
vboxsync
Message:

VBoxService/Control: Move the internal tool handling before VbglR3 init, needed for non-Windows guests, added some more logging.

Location:
trunk/src/VBox/Additions/common/VBoxService
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/VBoxService/VBoxService.cpp

    r33595 r33854  
    509509    RTR3Init();
    510510
    511     /*
    512      * Connect to the kernel part before daemonizing so we can fail and
    513      * complain if there is some kind of problem.  We need to initialize the
    514      * guest lib *before* we do the pre-init just in case one of services needs
    515      * do to some initial stuff with it.
    516      */
    517     VBoxServiceVerbose(2, "Calling VbgR3Init()\n");
    518     int rc = VbglR3Init();
    519     if (RT_FAILURE(rc))
    520         return VBoxServiceError("VbglR3Init failed with rc=%Rrc.\n", rc);
    521 
    522 #ifdef RT_OS_WINDOWS
    523     /*
    524      * Check if we're the specially spawned VBoxService.exe process that
    525      * handles page fusion.  This saves an extra executable.
    526      */
    527     if (    argc == 2
    528         &&  !strcmp(argv[1], "--pagefusionfork"))
    529         return VBoxServicePageSharingInitFork();
    530 #endif
    531 
    532511    g_pszProgName = RTPathFilename(argv[0]);
    533512
     513    int rc;
    534514#ifdef VBOXSERVICE_TOOLBOX
    535515    if (argc > 1)
     
    543523            return rc;
    544524    }
     525#endif
     526
     527    /*
     528     * Connect to the kernel part before daemonizing so we can fail and
     529     * complain if there is some kind of problem.  We need to initialize the
     530     * guest lib *before* we do the pre-init just in case one of services needs
     531     * do to some initial stuff with it.
     532     */
     533    VBoxServiceVerbose(2, "Calling VbgR3Init()\n");
     534    rc = VbglR3Init();
     535    if (RT_FAILURE(rc))
     536        return VBoxServiceError("VbglR3Init failed with rc=%Rrc.\n", rc);
     537
     538#ifdef RT_OS_WINDOWS
     539    /*
     540     * Check if we're the specially spawned VBoxService.exe process that
     541     * handles page fusion.  This saves an extra executable.
     542     */
     543    if (    argc == 2
     544        &&  !strcmp(argv[1], "--pagefusionfork"))
     545        return VBoxServicePageSharingInitFork();
    545546#endif
    546547
  • trunk/src/VBox/Additions/common/VBoxService/VBoxServiceControlExec.cpp

    r33808 r33854  
    10391039    rc = RTStrCopy(pszExpanded, cbExpanded, pszPath);
    10401040#endif
     1041#ifdef DEBUG
     1042        VBoxServiceVerbose(3, "ControlExec: VBoxServiceControlExecMakeFullPath: %s -> %s\n",
     1043                           pszPath, pszExpanded);
     1044#endif
    10411045    return rc;
    10421046}
     
    10711075
    10721076        rc = VBoxServiceControlExecMakeFullPath(pszExecResolved, pszResolved, cbResolved);
     1077#ifdef DEBUG
     1078        VBoxServiceVerbose(3, "ControlExec: VBoxServiceControlExecResolveExecutable: %s -> %s\n",
     1079                           pszFileName, pszResolved);
     1080#endif
    10731081        RTStrFree(pszExecResolved);
    10741082    }
     
    11201128            if (RTStrAPrintf(&pszNewArgs, "%s %s", pszFileName, szArgsExp))
    11211129            {
     1130#ifdef DEBUG
     1131                VBoxServiceVerbose(3, "ControlExec: VBoxServiceControlExecPrepareArgv: %s\n",
     1132                                   pszNewArgs);
     1133#endif
    11221134                int iNumArgsIgnored;
    11231135                rc = RTGetOptArgvFromString(ppapszArgv, &iNumArgsIgnored,
     
    15491561#ifdef DEBUG
    15501562    VBoxServiceVerbose(3, "ControlExec: Start process szCmd=%s, uFlags=%u, szArgs=%s, szEnv=%s, szUser=%s, szPW=%s, uTimeout=%u\n",
    1551                        szCmd, uFlags, szArgs, szEnv, szUser, szPassword, uTimeLimitMS);
     1563                       szCmd, uFlags, uNumArgs ? szArgs : "<None>", uNumEnvVars ? szEnv : "<None>", szUser, szPassword, uTimeLimitMS);
    15521564#endif
    15531565    if (RT_SUCCESS(rc))
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette