VirtualBox

Changeset 40529 in vbox for trunk/src/VBox/Additions/common


Ignore:
Timestamp:
Mar 19, 2012 11:11:18 AM (13 years ago)
Author:
vboxsync
Message:

VBoxService: Removed logging prefixes.

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

Legend:

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

    r40060 r40529  
    55
    66/*
    7  * Copyright (C) 2011 Oracle Corporation
     7 * Copyright (C) 2012 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    118118        if (rc == VERR_HGCM_SERVICE_NOT_FOUND) /* Host service is not available. */
    119119        {
    120             VBoxServiceVerbose(0, "Control: Guest property service is not available, skipping\n");
     120            VBoxServiceVerbose(0, "Guest property service is not available, skipping\n");
    121121            rc = VINF_SUCCESS;
    122122        }
    123123        else
    124             VBoxServiceError("Control: Failed to connect to the guest property service! Error: %Rrc\n", rc);
     124            VBoxServiceError("Failed to connect to the guest property service! Error: %Rrc\n", rc);
    125125    }
    126126    else
     
    186186    if (RT_SUCCESS(rc))
    187187    {
    188         VBoxServiceVerbose(3, "Control: Service client ID: %#x\n", g_uControlSvcClientID);
     188        VBoxServiceVerbose(3, "Service client ID: %#x\n", g_uControlSvcClientID);
    189189
    190190        /* Init thread lists. */
     
    202202        if (rc == VERR_HGCM_SERVICE_NOT_FOUND) /* Host service is not available. */
    203203        {
    204             VBoxServiceVerbose(0, "Control: Guest control service is not available\n");
     204            VBoxServiceVerbose(0, "Guest control service is not available\n");
    205205            rc = VERR_SERVICE_DISABLED;
    206206        }
    207207        else
    208             VBoxServiceError("Control: Failed to connect to the guest control service! Error: %Rrc\n", rc);
     208            VBoxServiceError("Failed to connect to the guest control service! Error: %Rrc\n", rc);
    209209        RTSemEventMultiDestroy(g_hControlEvent);
    210210        g_hControlEvent = NIL_RTSEMEVENTMULTI;
     
    233233    for (;;)
    234234    {
    235         VBoxServiceVerbose(3, "Control: Waiting for host msg ...\n");
     235        VBoxServiceVerbose(3, "Waiting for host msg ...\n");
    236236        uint32_t uMsg;
    237237        uint32_t cParms;
     
    239239        if (rc == VERR_TOO_MUCH_DATA)
    240240        {
    241             VBoxServiceVerbose(4, "Control: Message requires %ld parameters, but only 2 supplied -- retrying request (no error!)...\n", cParms);
     241            VBoxServiceVerbose(4, "Message requires %ld parameters, but only 2 supplied -- retrying request (no error!)...\n", cParms);
    242242            rc = VINF_SUCCESS; /* Try to get "real" message in next block below. */
    243243        }
    244244        else if (RT_FAILURE(rc))
    245             VBoxServiceVerbose(3, "Control: Getting host message failed with %Rrc\n", rc); /* VERR_GEN_IO_FAILURE seems to be normal if ran into timeout. */
    246         if (RT_SUCCESS(rc))
    247         {
    248             VBoxServiceVerbose(3, "Control: Msg=%u (%u parms) retrieved\n", uMsg, cParms);
     245            VBoxServiceVerbose(3, "Getting host message failed with %Rrc\n", rc); /* VERR_GEN_IO_FAILURE seems to be normal if ran into timeout. */
     246        if (RT_SUCCESS(rc))
     247        {
     248            VBoxServiceVerbose(3, "Msg=%u (%u parms) retrieved\n", uMsg, cParms);
    249249            switch (uMsg)
    250250            {
    251251                case HOST_CANCEL_PENDING_WAITS:
    252                     VBoxServiceVerbose(3, "Control: Host asked us to quit ...\n");
     252                    VBoxServiceVerbose(3, "Host asked us to quit ...\n");
    253253                    break;
    254254
     
    267267
    268268                default:
    269                     VBoxServiceVerbose(3, "Control: Unsupported message from host! Msg=%u\n", uMsg);
     269                    VBoxServiceVerbose(3, "Unsupported message from host! Msg=%u\n", uMsg);
    270270                    /* Don't terminate here; just wait for the next message. */
    271271                    break;
     
    325325        if (RT_SUCCESS(rc))
    326326        {
    327             VBoxServiceVerbose(3, "Control: Request to start process szCmd=%s, uFlags=0x%x, szArgs=%s, szEnv=%s, szUser=%s, uTimeout=%u\n",
     327            VBoxServiceVerbose(3, "Request to start process szCmd=%s, uFlags=0x%x, szArgs=%s, szEnv=%s, szUser=%s, uTimeout=%u\n",
    328328                               proc.szCmd, proc.uFlags,
    329329                               proc.uNumArgs ? proc.szArgs : "<None>",
     
    333333            rc = VBoxServiceControlReapThreads();
    334334            if (RT_FAILURE(rc))
    335                 VBoxServiceError("Control: Reaping stopped processes failed with rc=%Rrc\n", rc);
     335                VBoxServiceError("Reaping stopped processes failed with rc=%Rrc\n", rc);
    336336            /* Keep going. */
    337337
     
    354354    if (RT_FAILURE(rc))
    355355    {
    356         VBoxServiceError("Control: Starting process failed with rc=%Rrc\n", rc);
     356        VBoxServiceError("Starting process failed with rc=%Rrc\n", rc);
    357357
    358358        int rc2 = VbglR3GuestCtrlExecReportStatus(uClientID, uContextID, 0 /* PID, invalid. */,
     
    361361        if (RT_FAILURE(rc2))
    362362        {
    363             VBoxServiceError("Control: Error sending start process status to host, rc=%Rrc\n", rc2);
     363            VBoxServiceError("Error sending start process status to host, rc=%Rrc\n", rc2);
    364364            if (RT_SUCCESS(rc))
    365365                rc = rc2;
     
    445445    if (RT_SUCCESS(rc))
    446446    {
    447         VBoxServiceVerbose(3, "Control: Setting thread (PID %u) inactive\n",
    448                            pThread->uPID);
     447        VBoxServiceVerbose(3, "Setting thread (PID %u) to list %d\n",
     448                           pThread->uPID, enmList);
    449449
    450450        PRTLISTANCHOR pAnchor = NULL;
     
    563563    if (RT_FAILURE(rc))
    564564    {
    565         VBoxServiceError("Control: [PID %u]: Failed to retrieve exec input command! Error: %Rrc\n",
     565        VBoxServiceError("[PID %u]: Failed to retrieve exec input command! Error: %Rrc\n",
    566566                         uPID, rc);
    567567    }
    568568    else if (cbSize > cbMaxBufSize)
    569569    {
    570         VBoxServiceError("Control: [PID %u]: Too much input received! cbSize=%u, cbMaxBufSize=%u\n",
     570        VBoxServiceError("[PID %u]: Too much input received! cbSize=%u, cbMaxBufSize=%u\n",
    571571                         uPID, cbSize, cbMaxBufSize);
    572572        rc = VERR_INVALID_PARAMETER;
     
    581581        {
    582582            fPendingClose = true;
    583             VBoxServiceVerbose(4, "Control: [PID %u]: Got last input block of size %u ...\n",
     583            VBoxServiceVerbose(4, "[PID %u]: Got last input block of size %u ...\n",
    584584                               uPID, cbSize);
    585585        }
     
    587587        rc = VBoxServiceControlSetInput(uPID, uContextID, fPendingClose, pabBuffer,
    588588                                        cbSize, &cbWritten);
    589         VBoxServiceVerbose(4, "Control: [PID %u]: Written input, CID=%u, rc=%Rrc, uFlags=0x%x, fPendingClose=%d, cbSize=%u, cbWritten=%u\n",
     589        VBoxServiceVerbose(4, "[PID %u]: Written input, CID=%u, rc=%Rrc, uFlags=0x%x, fPendingClose=%d, cbSize=%u, cbWritten=%u\n",
    590590                           uPID, uContextID, rc, uFlags, fPendingClose, cbSize, cbWritten);
    591591        if (RT_SUCCESS(rc))
     
    619619    Assert(uStatus > INPUT_STS_UNDEFINED);
    620620
    621     VBoxServiceVerbose(3, "Control: [PID %u]: Input processed, CID=%u, uStatus=%u, uFlags=0x%x, cbWritten=%u\n",
     621    VBoxServiceVerbose(3, "[PID %u]: Input processed, CID=%u, uStatus=%u, uFlags=0x%x, cbWritten=%u\n",
    622622                       uPID, uContextID, uStatus, uFlags, cbWritten);
    623623
     
    629629
    630630    if (RT_FAILURE(rc))
    631         VBoxServiceError("Control: [PID %u]: Failed to report input status! Error: %Rrc\n",
     631        VBoxServiceError("[PID %u]: Failed to report input status! Error: %Rrc\n",
    632632                         uPID, rc);
    633633    return rc;
     
    659659            rc = VBoxServiceControlExecGetOutput(uPID, uContextID, uHandleID, RT_INDEFINITE_WAIT /* Timeout */,
    660660                                                 pBuf, _64K /* cbSize */, &cbRead);
    661             VBoxServiceVerbose(3, "Control: [PID %u]: Got output, rc=%Rrc, CID=%u, cbRead=%u, uHandle=%u, uFlags=%u\n",
     661            VBoxServiceVerbose(3, "[PID %u]: Got output, rc=%Rrc, CID=%u, cbRead=%u, uHandle=%u, uFlags=%u\n",
    662662                               uPID, rc, uContextID, cbRead, uHandleID, uFlags);
    663663
     
    704704
    705705    if (RT_FAILURE(rc))
    706         VBoxServiceError("Control: [PID %u]: Error handling output command! Error: %Rrc\n",
     706        VBoxServiceError("[PID %u]: Error handling output command! Error: %Rrc\n",
    707707                         uPID, rc);
    708708    return rc;
     
    713713static DECLCALLBACK(void) VBoxServiceControlStop(void)
    714714{
    715     VBoxServiceVerbose(3, "Control: Stopping ...\n");
     715    VBoxServiceVerbose(3, "Stopping ...\n");
    716716
    717717    /** @todo Later, figure what to do if we're in RTProcWait(). It's a very
     
    726726    if (g_uControlSvcClientID)
    727727    {
    728         VBoxServiceVerbose(3, "Control: Cancelling pending waits (client ID=%u) ...\n",
     728        VBoxServiceVerbose(3, "Cancelling pending waits (client ID=%u) ...\n",
    729729                           g_uControlSvcClientID);
    730730
    731731        int rc = VbglR3GuestCtrlCancelPendingWaits(g_uControlSvcClientID);
    732732        if (RT_FAILURE(rc))
    733             VBoxServiceError("Control: Cancelling pending waits failed; rc=%Rrc\n", rc);
     733            VBoxServiceError("Cancelling pending waits failed; rc=%Rrc\n", rc);
    734734    }
    735735}
     
    761761                if (RT_FAILURE(rc2))
    762762                {
    763                     VBoxServiceError("Control: Stopping guest process thread failed with rc=%Rrc\n", rc2);
     763                    VBoxServiceError("Stopping guest process thread failed with rc=%Rrc\n", rc2);
    764764                    if (RT_SUCCESS(rc)) /* Keep original failure. */
    765765                        rc = rc2;
     
    767767            }
    768768            else
    769                 VBoxServiceError("Control: Waiting on guest process thread failed with rc=%Rrc\n", rc2);
     769                VBoxServiceError("Waiting on guest process thread failed with rc=%Rrc\n", rc2);
    770770            /* Keep going. */
    771771
     
    781781    }
    782782
    783     VBoxServiceVerbose(4, "Control: Reaping threads returned with rc=%Rrc\n", rc);
     783    VBoxServiceVerbose(4, "Reaping threads returned with rc=%Rrc\n", rc);
    784784    return rc;
    785785}
     
    791791static void VBoxServiceControlShutdown(void)
    792792{
    793     VBoxServiceVerbose(2, "Control: Shutting down ...\n");
     793    VBoxServiceVerbose(2, "Shutting down ...\n");
    794794
    795795    /* Signal all threads in the active list that we want to shutdown. */
     
    808808                                               30 * 1000 /* Wait 30 seconds max. */);
    809809        if (RT_FAILURE(rc2))
    810             VBoxServiceError("Control: Guest process thread failed to stop; rc=%Rrc\n", rc2);
     810            VBoxServiceError("Guest process thread failed to stop; rc=%Rrc\n", rc2);
    811811
    812812        if (fLast)
     
    818818    int rc2 = VBoxServiceControlReapThreads();
    819819    if (RT_FAILURE(rc2))
    820         VBoxServiceError("Control: Reaping inactive threads failed with rc=%Rrc\n", rc2);
     820        VBoxServiceError("Reaping inactive threads failed with rc=%Rrc\n", rc2);
    821821
    822822    AssertMsg(RTListIsEmpty(&g_lstControlThreadsActive),
     
    828828    RTCritSectDelete(&g_csControlThreads);
    829829
    830     VBoxServiceVerbose(2, "Control: Shutting down complete\n");
     830    VBoxServiceVerbose(2, "Shutting down complete\n");
    831831}
    832832
     
    835835static DECLCALLBACK(void) VBoxServiceControlTerm(void)
    836836{
    837     VBoxServiceVerbose(3, "Control: Terminating ...\n");
     837    VBoxServiceVerbose(3, "Terminating ...\n");
    838838
    839839    VBoxServiceControlShutdown();
    840840
    841     VBoxServiceVerbose(3, "Control: Disconnecting client ID=%u ...\n",
     841    VBoxServiceVerbose(3, "Disconnecting client ID=%u ...\n",
    842842                       g_uControlSvcClientID);
    843843    VbglR3GuestCtrlDisconnect(g_uControlSvcClientID);
     
    879879                uProcsRunning++;
    880880
    881             VBoxServiceVerbose(3, "Control: Maximum served guest processes set to %u, running=%u\n",
     881            VBoxServiceVerbose(3, "Maximum served guest processes set to %u, running=%u\n",
    882882                               g_uControlProcsMaxKept, uProcsRunning);
    883883
     
    885885            if (iProcsLeft < 0)
    886886            {
    887                 VBoxServiceVerbose(3, "Control: Maximum running guest processes reached (%u)\n",
     887                VBoxServiceVerbose(3, "Maximum running guest processes reached (%u)\n",
    888888                                   g_uControlProcsMaxKept);
    889889                fLimitReached = true;
     
    979979                    uint32_t uTriedPID = uPID;
    980980                    uPID += 391939;
    981                     VBoxServiceVerbose(2, "ControlThread: PID %u was used before, trying again with %u ...\n",
     981                    VBoxServiceVerbose(2, "PID %u was used before, trying again with %u ...\n",
    982982                                       uTriedPID, uPID);
    983983                    fTryAgain = true;
  • trunk/src/VBox/Additions/common/VBoxService/VBoxServiceControlThread.cpp

    r39906 r40529  
    55
    66/*
    7  * Copyright (C) 2011 Oracle Corporation
     7 * Copyright (C) 2012 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    152152    AssertPtrReturn(pThread, VERR_INVALID_POINTER);
    153153
    154     VBoxServiceVerbose(3, "ControlThread: [PID %u]: Freeing ...\n",
     154    VBoxServiceVerbose(3, "[PID %u]: Freeing ...\n",
    155155                       pThread->uPID);
    156156
     
    170170        RTStrFree(pThread->pszPassword);
    171171
    172         VBoxServiceVerbose(3, "ControlThread: [PID %u]: Setting stopped state\n",
     172        VBoxServiceVerbose(3, "[PID %u]: Setting stopped state\n",
    173173                           pThread->uPID);
    174174
     
    204204    AssertPtrReturn(pThread, VERR_INVALID_POINTER);
    205205
    206     VBoxServiceVerbose(3, "ControlThread: [PID %u]: Stopping ...\n",
     206    VBoxServiceVerbose(3, "[PID %u]: Stopping ...\n",
    207207                       pThread->uPID);
    208208
    209209    int rc = vboxServiceControlThreadRequestCancel(pThread->pRequest);
    210210    if (RT_FAILURE(rc))
    211         VBoxServiceError("ControlThread: [PID %u]: Signalling request event failed, rc=%Rrc\n",
     211        VBoxServiceError("[PID %u]: Signalling request event failed, rc=%Rrc\n",
    212212                         pThread->uPID, rc);
    213213
     
    221221        rc = VBoxServiceControlThreadPerform(pThread->uPID, pRequest);
    222222        if (RT_FAILURE(rc))
    223             VBoxServiceVerbose(3, "ControlThread: [PID %u]: Sending quit request failed with rc=%Rrc\n",
     223            VBoxServiceVerbose(3, "[PID %u]: Sending quit request failed with rc=%Rrc\n",
    224224                               pThread->uPID, rc);
    225225
     
    245245        && ASMAtomicReadBool(&pThread->fStarted))
    246246    {
    247         VBoxServiceVerbose(2, "ControlThread: [PID %u]: Waiting for shutdown ...\n",
     247        VBoxServiceVerbose(2, "[PID %u]: Waiting for shutdown ...\n",
    248248                           pThread->uPID);
    249249
     
    253253        if (RT_FAILURE(rc))
    254254        {
    255             VBoxServiceError("ControlThread: [PID %u]: Waiting for shutting down thread returned error rc=%Rrc\n",
     255            VBoxServiceError("[PID %u]: Waiting for shutting down thread returned error rc=%Rrc\n",
    256256                             pThread->uPID, rc);
    257257        }
     
    260260            if (RT_FAILURE(rcThread))
    261261            {
    262                 VBoxServiceError("ControlThread: [PID %u]: Shutdown returned error rc=%Rrc\n",
     262                VBoxServiceError("[PID %u]: Shutdown returned error rc=%Rrc\n",
    263263                                 pThread->uPID, rcThread);
    264264                rc = rcThread;
     
    328328
    329329#ifdef DEBUG
    330     VBoxServiceVerbose(4, "ControlThread: VBoxServiceControlThreadHandleOutputError: fPollEvt=0x%x, idPollHnd=%u\n",
     330    VBoxServiceVerbose(4, "VBoxServiceControlThreadHandleOutputError: fPollEvt=0x%x, idPollHnd=%u\n",
    331331                       fPollEvt, idPollHnd);
    332332#endif
     
    344344        && cbReadable)
    345345    {
    346         VBoxServiceVerbose(3, "ControlThread: VBoxServiceControlThreadHandleOutputError: idPollHnd=%u has %ld bytes left, vetoing close\n",
     346        VBoxServiceVerbose(3, "VBoxServiceControlThreadHandleOutputError: idPollHnd=%u has %ld bytes left, vetoing close\n",
    347347                           idPollHnd, cbReadable);
    348348
     
    353353    }
    354354    else
    355         VBoxServiceVerbose(3, "ControlThread: VBoxServiceControlThreadHandleOutputError: idPollHnd=%u will be closed\n",
     355        VBoxServiceVerbose(3, "VBoxServiceControlThreadHandleOutputError: idPollHnd=%u will be closed\n",
    356356                           idPollHnd);
    357357
     
    382382{
    383383#if 0
    384     VBoxServiceVerbose(4, "ControlThread: VBoxServiceControlThreadHandleOutputEvent: fPollEvt=0x%x, idPollHnd=%u\n",
     384    VBoxServiceVerbose(4, "VBoxServiceControlThreadHandleOutputEvent: fPollEvt=0x%x, idPollHnd=%u\n",
    385385                       fPollEvt, idPollHnd);
    386386#endif
     
    394394        && cbReadable)
    395395    {
    396         VBoxServiceVerbose(4, "ControlThread: VBoxServiceControlThreadHandleOutputEvent: cbReadable=%ld\n",
     396        VBoxServiceVerbose(4, "VBoxServiceControlThreadHandleOutputEvent: cbReadable=%ld\n",
    397397                           cbReadable);
    398398    }
     
    406406        rc = RTPipeRead(*phPipeR,
    407407                        byData, sizeof(byData), &cbRead);
    408         VBoxServiceVerbose(4, "ControlThread: VBoxServiceControlThreadHandleOutputEvent cbRead=%u, rc=%Rrc\n",
     408        VBoxServiceVerbose(4, "VBoxServiceControlThreadHandleOutputEvent cbRead=%u, rc=%Rrc\n",
    409409                           cbRead, rc);
    410410
     
    436436    int rc = RTPipeRead(pThread->hNotificationPipeR, abBuf, sizeof(abBuf), &cbIgnore);
    437437    if (RT_FAILURE(rc))
    438         VBoxServiceError("ControlThread: Draining IPC notification pipe failed with rc=%Rrc\n", rc);
     438        VBoxServiceError("Draining IPC notification pipe failed with rc=%Rrc\n", rc);
    439439
    440440    int rcReq = VINF_SUCCESS; /* Actual request result. */
     
    443443    if (!pRequest)
    444444    {
    445         VBoxServiceError("ControlThread: IPC request is invalid\n");
     445        VBoxServiceError("IPC request is invalid\n");
    446446        return VERR_INVALID_POINTER;
    447447    }
     
    532532                 ? rcReq : rc;
    533533
    534     VBoxServiceVerbose(2, "ControlThread: [PID %u]: Handled req=%u, CID=%u, rc=%Rrc, cbData=%u\n",
     534    VBoxServiceVerbose(2, "[PID %u]: Handled req=%u, CID=%u, rc=%Rrc, cbData=%u\n",
    535535                       pThread->uPID, pRequest->enmType, pRequest->uCID, pRequest->rc, pRequest->cbData);
    536536
     
    589589    if (RT_FAILURE(rc))
    590590    {
    591         VBoxServiceError("ControlThread: Unable to assign PID=%u, to new thread, rc=%Rrc\n",
     591        VBoxServiceError("Unable to assign PID=%u, to new thread, rc=%Rrc\n",
    592592                         hProcess, rc);
    593593        return rc;
     
    598598     * and that it's now OK to send input to the process.
    599599     */
    600     VBoxServiceVerbose(2, "ControlThread: [PID %u]: Process \"%s\" started, CID=%u, User=%s\n",
     600    VBoxServiceVerbose(2, "[PID %u]: Process \"%s\" started, CID=%u, User=%s\n",
    601601                       pThread->uPID, pThread->pszCmd, pThread->uContextID, pThread->pszUser);
    602602    rc = VbglR3GuestCtrlExecReportStatus(pThread->uClientID, pThread->uContextID,
     
    623623        if (RT_SUCCESS(rc2))
    624624        {
    625             /*VBoxServiceVerbose(4, "ControlThread: [PID %u}: RTPollNoResume idPollHnd=%u\n",
     625            /*VBoxServiceVerbose(4, "[PID %u}: RTPollNoResume idPollHnd=%u\n",
    626626                                 pThread->uPID, idPollHnd);*/
    627627            switch (idPollHnd)
     
    657657
    658658#if 0
    659         VBoxServiceVerbose(4, "ControlThread: [PID %u]: Polling done, pollRC=%Rrc, pollCnt=%u, rc=%Rrc, fShutdown=%RTbool\n",
     659        VBoxServiceVerbose(4, "[PID %u]: Polling done, pollRC=%Rrc, pollCnt=%u, rc=%Rrc, fShutdown=%RTbool\n",
    660660                           pThread->uPID, rc2, RTPollSetGetCount(hPollSet), rc, pThread->fShutdown);
    661661#endif
     
    703703            if (cMsElapsed >= cMsTimeout)
    704704            {
    705                 VBoxServiceVerbose(3, "ControlThread: [PID %u]: Timed out (%ums elapsed > %ums timeout), killing ...",
     705                VBoxServiceVerbose(3, "[PID %u]: Timed out (%ums elapsed > %ums timeout), killing ...",
    706706                                   pThread->uPID, cMsElapsed, cMsTimeout);
    707707
     
    752752        if (MsProcessKilled == UINT64_MAX)
    753753        {
    754             VBoxServiceVerbose(3, "ControlThread: [PID %u]: Is still alive and not killed yet\n",
     754            VBoxServiceVerbose(3, "[PID %u]: Is still alive and not killed yet\n",
    755755                               pThread->uPID);
    756756
     
    762762        for (size_t i = 0; i < 10; i++)
    763763        {
    764             VBoxServiceVerbose(4, "ControlThread: [PID %u]: Kill attempt %d/10: Waiting to exit ...\n",
     764            VBoxServiceVerbose(4, "[PID %u]: Kill attempt %d/10: Waiting to exit ...\n",
    765765                               pThread->uPID, i + 1);
    766766            rc2 = RTProcWait(hProcess, RTPROCWAIT_FLAGS_NOBLOCK, &ProcessStatus);
    767767            if (RT_SUCCESS(rc2))
    768768            {
    769                 VBoxServiceVerbose(4, "ControlThread: [PID %u]: Kill attempt %d/10: Exited\n",
     769                VBoxServiceVerbose(4, "[PID %u]: Kill attempt %d/10: Exited\n",
    770770                                   pThread->uPID, i + 1);
    771771                fProcessAlive = false;
     
    774774            if (i >= 5)
    775775            {
    776                 VBoxServiceVerbose(4, "ControlThread: [PID %u]: Kill attempt %d/10: Trying to terminate ...\n",
     776                VBoxServiceVerbose(4, "[PID %u]: Kill attempt %d/10: Trying to terminate ...\n",
    777777                                   pThread->uPID, i + 1);
    778778                RTProcTerminate(hProcess);
     
    782782
    783783        if (fProcessAlive)
    784             VBoxServiceVerbose(3, "ControlThread: [PID %u]: Could not be killed\n", pThread->uPID);
     784            VBoxServiceVerbose(3, "[PID %u]: Could not be killed\n", pThread->uPID);
    785785    }
    786786
     
    796796        if (     fProcessTimedOut  && !fProcessAlive && MsProcessKilled != UINT64_MAX)
    797797        {
    798             VBoxServiceVerbose(3, "ControlThread: [PID %u]: Timed out and got killed\n",
     798            VBoxServiceVerbose(3, "[PID %u]: Timed out and got killed\n",
    799799                               pThread->uPID);
    800800            uStatus = PROC_STS_TOK;
     
    802802        else if (fProcessTimedOut  &&  fProcessAlive && MsProcessKilled != UINT64_MAX)
    803803        {
    804             VBoxServiceVerbose(3, "ControlThread: [PID %u]: Timed out and did *not* get killed\n",
     804            VBoxServiceVerbose(3, "[PID %u]: Timed out and did *not* get killed\n",
    805805                               pThread->uPID);
    806806            uStatus = PROC_STS_TOA;
     
    808808        else if (pThread->fShutdown && (fProcessAlive || MsProcessKilled != UINT64_MAX))
    809809        {
    810             VBoxServiceVerbose(3, "ControlThread: [PID %u]: Got terminated because system/service is about to shutdown\n",
     810            VBoxServiceVerbose(3, "[PID %u]: Got terminated because system/service is about to shutdown\n",
    811811                               pThread->uPID);
    812812            uStatus = PROC_STS_DWN; /* Service is stopping, process was killed. */
     
    815815        else if (fProcessAlive)
    816816        {
    817             VBoxServiceError("ControlThread: [PID %u]: Is alive when it should not!\n",
     817            VBoxServiceError("[PID %u]: Is alive when it should not!\n",
    818818                             pThread->uPID);
    819819        }
    820820        else if (MsProcessKilled != UINT64_MAX)
    821821        {
    822             VBoxServiceError("ControlThread: [PID %u]: Has been killed when it should not!\n",
     822            VBoxServiceError("[PID %u]: Has been killed when it should not!\n",
    823823                             pThread->uPID);
    824824        }
    825825        else if (ProcessStatus.enmReason == RTPROCEXITREASON_NORMAL)
    826826        {
    827             VBoxServiceVerbose(3, "ControlThread: [PID %u]: Ended with RTPROCEXITREASON_NORMAL (Exit code: %u)\n",
     827            VBoxServiceVerbose(3, "[PID %u]: Ended with RTPROCEXITREASON_NORMAL (Exit code: %u)\n",
    828828                               pThread->uPID, ProcessStatus.iStatus);
    829829
     
    833833        else if (ProcessStatus.enmReason == RTPROCEXITREASON_SIGNAL)
    834834        {
    835             VBoxServiceVerbose(3, "ControlThread: [PID %u]: Ended with RTPROCEXITREASON_SIGNAL (Signal: %u)\n",
     835            VBoxServiceVerbose(3, "[PID %u]: Ended with RTPROCEXITREASON_SIGNAL (Signal: %u)\n",
    836836                               pThread->uPID, ProcessStatus.iStatus);
    837837
     
    842842        {
    843843            /* ProcessStatus.iStatus will be undefined. */
    844             VBoxServiceVerbose(3, "ControlThread: [PID %u]: Ended with RTPROCEXITREASON_ABEND\n",
     844            VBoxServiceVerbose(3, "[PID %u]: Ended with RTPROCEXITREASON_ABEND\n",
    845845                               pThread->uPID);
    846846
     
    849849        }
    850850        else
    851             VBoxServiceVerbose(1, "ControlThread: [PID %u]: Handling process status %u not implemented\n",
     851            VBoxServiceVerbose(1, "[PID %u]: Handling process status %u not implemented\n",
    852852                               pThread->uPID, ProcessStatus.enmReason);
    853853
    854         VBoxServiceVerbose(2, "ControlThread: [PID %u]: Ended, ClientID=%u, CID=%u, Status=%u, Flags=0x%x\n",
     854        VBoxServiceVerbose(2, "[PID %u]: Ended, ClientID=%u, CID=%u, Status=%u, Flags=0x%x\n",
    855855                           pThread->uPID, pThread->uClientID, pThread->uContextID, uStatus, uFlags);
    856856        rc = VbglR3GuestCtrlExecReportStatus(pThread->uClientID, pThread->uContextID,
     
    858858                                             NULL /* pvData */, 0 /* cbData */);
    859859        if (RT_FAILURE(rc))
    860             VBoxServiceError("ControlThread: [PID %u]: Error reporting final status to host; rc=%Rrc\n",
     860            VBoxServiceError("[PID %u]: Error reporting final status to host; rc=%Rrc\n",
    861861                             pThread->uPID, rc);
    862862
    863         VBoxServiceVerbose(3, "ControlThread: [PID %u]: Process loop ended with rc=%Rrc\n",
     863        VBoxServiceVerbose(3, "[PID %u]: Process loop ended with rc=%Rrc\n",
    864864                           pThread->uPID, rc);
    865865    }
    866866    else
    867         VBoxServiceError("ControlThread: [PID %u]: Loop failed with rc=%Rrc\n",
     867        VBoxServiceError("[PID %u]: Loop failed with rc=%Rrc\n",
    868868                         pThread->uPID, rc);
    869869    return rc;
     
    970970        return VINF_SUCCESS;
    971971
    972     VBoxServiceVerbose(4, "ControlThread: Cancelling request=0x%p\n", pReq);
     972    VBoxServiceVerbose(4, "Cancelling request=0x%p\n", pReq);
    973973
    974974    return RTSemEventMultiSignal(pReq->Event);
     
    986986    AssertPtrReturnVoid(pReq);
    987987
    988     VBoxServiceVerbose(4, "ControlThread: Freeing request=0x%p (event=%RTsem)\n",
     988    VBoxServiceVerbose(4, "Freeing request=0x%p (event=%RTsem)\n",
    989989                       pReq, &pReq->Event);
    990990
     
    10111011    if (RT_SUCCESS(rc))
    10121012    {
    1013         VBoxServiceVerbose(4, "ControlThread: Performed request with rc=%Rrc, cbData=%u\n",
     1013        VBoxServiceVerbose(4, "Performed request with rc=%Rrc, cbData=%u\n",
    10141014                           pReq->rc, pReq->cbData);
    10151015
     
    10181018    }
    10191019    else
    1020         VBoxServiceError("ControlThread: Waiting for request failed, rc=%Rrc\n", rc);
     1020        VBoxServiceError("Waiting for request failed, rc=%Rrc\n", rc);
    10211021
    10221022    return rc;
     
    11181118#endif
    11191119#ifdef DEBUG
    1120     VBoxServiceVerbose(3, "ControlThread: VBoxServiceControlExecMakeFullPath: %s -> %s\n",
     1120    VBoxServiceVerbose(3, "VBoxServiceControlExecMakeFullPath: %s -> %s\n",
    11211121                       pszPath, pszExpanded);
    11221122#endif
     
    11271127/**
    11281128 * Resolves the full path of a specified executable name. This function also
    1129  * resolves internal VBoxService tools to its appropriate executable path + name.
     1129 * resolves internal VBoxService tools to its appropriate executable path + name if
     1130 * VBOXSERVICE_NAME is specified as pszFileName.
    11301131 *
    11311132 * @return  IPRT status code.
     
    11701171 *
    11711172 * @return IPRT status code.
    1172  * @param  pszArgv0         First argument (argv0), either original or modified version.
     1173 * @param  pszArgv0         First argument (argv0), either original or modified version.  Optional.
    11731174 * @param  papszArgs        Original argv command line from the host, starting at argv[1].
    11741175 * @param  ppapszArgv       Pointer to a pointer with the new argv command line.
     
    12081209                                    pszNewArgs ? pszNewArgs : "", NULL /* Use standard separators. */);
    12091210    }
     1211
     1212#ifdef DEBUG
     1213    VBoxServiceVerbose(3, "Arguments argv0=%s, new arguments=%s\n",
     1214                       pszArgv0 ? pszArgv0 : "<NULL>", pszNewArgs);
     1215#endif
    12101216
    12111217    if (pszNewArgs)
     
    13261332                uProcFlags |= RTPROC_FLAGS_SERVICE;
    13271333#ifdef DEBUG
    1328             VBoxServiceVerbose(3, "ControlThread: Command: %s\n", szExecExp);
     1334            VBoxServiceVerbose(3, "Command: %s\n", szExecExp);
    13291335            for (size_t i = 0; papszArgsExp[i]; i++)
    1330                 VBoxServiceVerbose(3, "ControlThread:\targv[%ld]: %s\n", i, papszArgsExp[i]);
     1336                VBoxServiceVerbose(3, "\targv[%ld]: %s\n", i, papszArgsExp[i]);
    13311337#endif
    13321338            /* Do normal execution. */
     
    13511357{
    13521358    AssertPtrReturn(pThread, VERR_INVALID_POINTER);
    1353     VBoxServiceVerbose(3, "ControlThread: Thread of process \"%s\" started\n", pThread->pszCmd);
     1359    VBoxServiceVerbose(3, "Thread of process \"%s\" started\n", pThread->pszCmd);
    13541360
    13551361    int rc = VBoxServiceControlListSet(VBOXSERVICECTRLTHREADLIST_RUNNING, pThread);
     
    13591365    if (RT_FAILURE(rc))
    13601366    {
    1361         VBoxServiceError("ControlThread: Thread failed to connect to the guest control service, aborted! Error: %Rrc\n", rc);
     1367        VBoxServiceError("Thread failed to connect to the guest control service, aborted! Error: %Rrc\n", rc);
    13621368        RTThreadUserSignal(RTThreadSelf());
    13631369        return rc;
    13641370    }
    1365     VBoxServiceVerbose(3, "ControlThread: Guest process \"%s\" got client ID=%u, flags=0x%x\n",
     1371    VBoxServiceVerbose(3, "Guest process \"%s\" got client ID=%u, flags=0x%x\n",
    13661372                       pThread->pszCmd, pThread->uClientID, pThread->uFlags);
    13671373
     
    14481454                                                                           &hProcess);
    14491455                                if (RT_FAILURE(rc))
    1450                                     VBoxServiceError("ControlThread: Error starting process, rc=%Rrc\n", rc);
     1456                                    VBoxServiceError("Error starting process, rc=%Rrc\n", rc);
    14511457                                /*
    14521458                                 * Tell the control thread that it can continue
     
    15351541                                                  NULL /* pvData */, 0 /* cbData */);
    15361542            if (RT_FAILURE(rc2))
    1537                 VBoxServiceError("ControlThread: Could not report process failure error; rc=%Rrc (process error %Rrc)\n",
     1543                VBoxServiceError("Could not report process failure error; rc=%Rrc (process error %Rrc)\n",
    15381544                                 rc2, rc);
    15391545        }
    15401546
    1541         VBoxServiceVerbose(3, "ControlThread: [PID %u]: Cancelling pending host requests (client ID=%u)\n",
     1547        VBoxServiceVerbose(3, "[PID %u]: Cancelling pending host requests (client ID=%u)\n",
    15421548                           pThread->uPID, pThread->uClientID);
    15431549        rc2 = VbglR3GuestCtrlCancelPendingWaits(pThread->uClientID);
    15441550        if (RT_FAILURE(rc2))
    15451551        {
    1546             VBoxServiceError("ControlThread: [PID %u]: Cancelling pending host requests failed; rc=%Rrc\n",
     1552            VBoxServiceError("[PID %u]: Cancelling pending host requests failed; rc=%Rrc\n",
    15471553                             pThread->uPID, rc2);
    15481554            if (RT_SUCCESS(rc))
     
    15511557
    15521558        /* Disconnect from guest control service. */
    1553         VBoxServiceVerbose(3, "ControlThread: [PID %u]: Disconnecting (client ID=%u) ...\n",
     1559        VBoxServiceVerbose(3, "[PID %u]: Disconnecting (client ID=%u) ...\n",
    15541560                           pThread->uPID, pThread->uClientID);
    15551561        VbglR3GuestCtrlDisconnect(pThread->uClientID);
     
    15571563    }
    15581564
    1559     VBoxServiceVerbose(3, "ControlThread: [PID %u]: Thread of process \"%s\" ended with rc=%Rrc\n",
     1565    VBoxServiceVerbose(3, "[PID %u]: Thread of process \"%s\" ended with rc=%Rrc\n",
    15601566                       pThread->uPID, pThread->pszCmd, rc);
    15611567
     
    16221628        if (RT_FAILURE(rc))
    16231629        {
    1624             VBoxServiceError("ControlThread: RTThreadCreate failed, rc=%Rrc\n, pThread=%p\n",
     1630            VBoxServiceError("RTThreadCreate failed, rc=%Rrc\n, pThread=%p\n",
    16251631                             rc, pThread);
    16261632        }
    16271633        else
    16281634        {
    1629             VBoxServiceVerbose(4, "ControlThread: Waiting for thread to initialize ...\n");
     1635            VBoxServiceVerbose(4, "Waiting for thread to initialize ...\n");
    16301636
    16311637            /* Wait for the thread to initialize. */
     
    16351641                || RT_FAILURE(rc))
    16361642            {
    1637                 VBoxServiceError("ControlThread: Thread for process \"%s\" failed to start, rc=%Rrc\n",
     1643                VBoxServiceError("Thread for process \"%s\" failed to start, rc=%Rrc\n",
    16381644                                 pProcess->szCmd, rc);
    16391645            }
     
    16911697                && cbWritten)
    16921698            {
    1693                 VBoxServiceVerbose(3, "ControlThread: [PID %u]: Waiting for response on enmType=%u, pvData=0x%p, cbData=%u\n",
     1699                VBoxServiceVerbose(3, "[PID %u]: Waiting for response on enmType=%u, pvData=0x%p, cbData=%u\n",
    16941700                                   uPID, pRequest->enmType, pRequest->pvData, pRequest->cbData);
    16951701
     
    17031709        rc = VERR_NOT_FOUND;
    17041710
    1705     VBoxServiceVerbose(3, "ControlThread: [PID %u]: Performed enmType=%u, uCID=%u, pvData=0x%p, cbData=%u, rc=%Rrc\n",
     1711    VBoxServiceVerbose(3, "[PID %u]: Performed enmType=%u, uCID=%u, pvData=0x%p, cbData=%u, rc=%Rrc\n",
    17061712                       uPID, pRequest->enmType, pRequest->uCID, pRequest->pvData, pRequest->cbData, rc);
    17071713    return 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