VirtualBox

Changeset 36745 in vbox


Ignore:
Timestamp:
Apr 20, 2011 10:08:26 AM (14 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
71276
Message:

Another fix for internal toolbox invocation (argv0), logging.

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

Legend:

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

    r36338 r36745  
    588588     * global mutex restrictions.
    589589     */
    590 # if 0 /** @todo r=bird: pending argv[0] bugfixing.  */
    591590    if (VBoxServiceToolboxMain(argc, argv, &rcExit))
    592591        return rcExit;
    593 # else
    594     if (argc > 1)
    595         if (VBoxServiceToolboxMain(argc - 1, &argv[1], &rcExit))
    596             return rcExit;
    597 # endif
    598592#endif
    599593
  • trunk/src/VBox/Additions/common/VBoxService/VBoxServiceControlExec.cpp

    r36734 r36745  
    573573                                             NULL /* pvData */, 0 /* cbData */);
    574574        VBoxServiceVerbose(3, "ControlExec: Process loop ended with rc=%Rrc\n", rc);
     575
     576        /*
     577         * Dump stdout for debugging purposes.
     578         * Only do that on *very* high verbosity (5+).
     579         */
     580        if (g_cVerbosity >= 5)
     581        {
     582            uint8_t szBuf[_64K];
     583            uint32_t cbOffset = 0;
     584            uint32_t cbRead, cbLeft;
     585            while (RT_SUCCESS(   VBoxServicePipeBufPeek(&pData->stdOut, szBuf, sizeof(szBuf),
     586                                                        cbOffset, &cbRead, &cbLeft))
     587                              && cbRead)
     588            {
     589                VBoxServiceVerbose(5, "[%u]: %s\n", pData->uPID, szBuf);
     590                cbOffset += cbRead;
     591                if (!cbLeft)
     592                    break;
     593            }
     594        }
    575595    }
    576596    else
     
    867887                uProcFlags |= RTPROC_FLAGS_SERVICE;
    868888#ifdef DEBUG
    869             char *pszCmdLine;
    870             rc = RTGetOptArgvToString(&pszCmdLine, papszArgsExp, 0 /* Default */);
    871             AssertRC(rc);
    872             VBoxServiceVerbose(3, "ControlExec: Executing: %s %s\n",
    873                                szExecExp, pszCmdLine);
    874             RTStrFree(pszCmdLine);
     889            VBoxServiceVerbose(3, "Command: %s\n", szExecExp);
     890            for (size_t i = 0; papszArgsExp[i]; i++)
     891                VBoxServiceVerbose(3, "\targv[%ld]: %s\n", i, papszArgsExp[i]);
    875892#endif
    876893            /* Do normal execution. */
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