VirtualBox

Changeset 83405 in vbox for trunk/src/VBox/Main/src-client


Ignore:
Timestamp:
Mar 25, 2020 12:45:01 PM (5 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
136622
Message:

Guest Control/Main + VBoxService: Resolved another @todo: Added ability for guest processes to use argv[0] independently of the actual execution command. bugref:9320

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-client/GuestProcessImpl.cpp

    r82968 r83405  
    3535# error "VBOX_WITH_GUEST_CONTROL must defined in this file"
    3636#endif
     37#include "GuestImpl.h"
    3738#include "GuestProcessImpl.h"
    3839#include "GuestSessionImpl.h"
     
    10771078        papszArgv[cArgs] = NULL;
    10781079
    1079         if (uProtocol < UINT32_C(0xdeadbeef) ) /** @todo implement a way of sending argv[0], best idea is a new command. */
     1080        Guest *pGuest = mSession->i_getParent();
     1081        AssertPtr(pGuest);
     1082
     1083        /* If the Guest Additions don't support using argv[0] correctly (< 6.1.x), don't supply it. */
     1084        if (!RT_BOOL(pGuest->i_getGuestControlFeatures0() & VBOX_GUESTCTRL_GF_0_PROCESS_ARGV0))
    10801085            vrc = RTGetOptArgvToString(&pszArgs, papszArgv + 1, RTGETOPTARGV_CNV_QUOTE_BOURNE_SH);
    1081         else
     1086        else /* ... else send the whole argv, including argv[0]. */
    10821087            vrc = RTGetOptArgvToString(&pszArgs, papszArgv, RTGETOPTARGV_CNV_QUOTE_BOURNE_SH);
    10831088
Note: See TracChangeset for help on using the changeset viewer.

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