- Timestamp:
- Mar 23, 2023 6:00:47 PM (19 months ago)
- Location:
- trunk/src/VBox
- Files:
-
- 6 edited
-
Frontends/VBoxManage/VBoxManageGuestCtrl.cpp (modified) (1 diff)
-
Frontends/VirtualBox/src/guestctrl/UIGuestControlInterface.cpp (modified) (1 diff)
-
Main/idl/VirtualBox.xidl (modified) (5 diffs)
-
Main/include/GuestSessionImpl.h (modified) (2 diffs)
-
Main/src-client/GuestSessionImpl.cpp (modified) (2 diffs)
-
ValidationKit/tests/additions/tdAddGuestCtrl.py (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxManage/VBoxManageGuestCtrl.cpp
r99120 r99150 1364 1364 ComPtr<IGuestProcess> pProcess; 1365 1365 CHECK_ERROR_BREAK(pCtx->pGuestSession, ProcessCreate(Bstr(pszImage).raw(), 1366 ComSafeArrayAsInParam(aArgs), 1366 1367 Bstr(pszCwd).raw(), 1367 ComSafeArrayAsInParam(aArgs),1368 1368 ComSafeArrayAsInParam(aEnv), 1369 1369 ComSafeArrayAsInParam(aCreateFlags), -
trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIGuestControlInterface.cpp
r99121 r99150 558 558 createFlags.push_back(KProcessCreateFlag_WaitForProcessStartOnly); 559 559 CGuestProcess process = guestSession.ProcessCreate(commandData.m_strExePath, 560 NULL /* CWD */,561 560 commandData.m_arguments, 561 "", /* Working directory. */ 562 562 commandData.m_environmentChanges, 563 563 createFlags, -
trunk/src/VBox/Main/idl/VirtualBox.xidl
r99120 r99150 14814 14814 <interface 14815 14815 name="IGuestSession" extends="$unknown" 14816 uuid="5 591bead-9c1d-4cbd-9669-2d0b04fac0a8"14816 uuid="5e54f60b-6dcd-4594-a6c9-cf968f004341" 14817 14817 wsmap="managed" 14818 14818 reservedMethods="8" reservedAttributes="12" … … 15966 15966 </desc> 15967 15967 </param> 15968 <param name="cwd" type="wstring" dir="in">15969 <desc>15970 Path to the directory in which to execute in the guest. The15971 directory has to exist in the guest VM with search rights to the15972 session user in order to succeed. If empty/null, the session15973 user's default (typically 'home') directory is used. If not a15974 full path, it is interpreted relative to the default directory;15975 e.g. 'work' means '$HOME/work' (according to the guest's '$HOME'-15976 like concept).15977 </desc>15978 </param>15979 15968 <param name="arguments" type="wstring" dir="in" safearray="yes"> 15980 15969 <desc>Array of arguments passed to the new process. … … 15988 15977 </desc> 15989 15978 </param> 15990 <param name="environmentChanges" type="wstring" dir="in" safearray="yes">15991 <desc>15992 Set of environment changes to complement15993 <link to="IGuestSession::environmentChanges"/>. Takes precedence15994 over the session ones. The changes are in putenv format, i.e.15995 "VAR=VALUE" for setting and "VAR" for unsetting.15996 15997 The changes are applied to the base environment of the impersonated15998 guest user (<link to="IGuestSession::environmentBase"/>) when15999 creating the process. (This is done on the guest side of things in16000 order to be compatible with older Guest Additions. That is one of16001 the motivations for not passing in the whole environment here.)16002 </desc>16003 </param>16004 <param name="flags" type="ProcessCreateFlag" dir="in" safearray="yes">16005 <desc>16006 Process creation flags;16007 see <link to="ProcessCreateFlag"/> for more information.16008 </desc>16009 </param>16010 <param name="timeoutMS" type="unsigned long" dir="in">16011 <desc>16012 Timeout (in ms) for limiting the guest process' running time.16013 Pass 0 for an infinite timeout. On timeout the guest process will be16014 killed and its status will be put to an appropriate value. See16015 <link to="ProcessStatus"/> for more information.16016 </desc>16017 </param>16018 <param name="guestProcess" type="IGuestProcess" dir="return">16019 <desc>Guest process object of the newly created process.</desc>16020 </param>16021 </method>16022 16023 <method name="processCreateEx">16024 <desc>16025 Creates a new process running in the guest with the extended options16026 for setting the process priority and affinity.16027 16028 See <link to="IGuestSession::processCreate"/> for more information.16029 </desc>16030 15979 <param name="cwd" type="wstring" dir="in"> 16031 15980 <desc> … … 16039 15988 </desc> 16040 15989 </param> 15990 <param name="environmentChanges" type="wstring" dir="in" safearray="yes"> 15991 <desc> 15992 Set of environment changes to complement 15993 <link to="IGuestSession::environmentChanges"/>. Takes precedence 15994 over the session ones. The changes are in putenv format, i.e. 15995 "VAR=VALUE" for setting and "VAR" for unsetting. 15996 15997 The changes are applied to the base environment of the impersonated 15998 guest user (<link to="IGuestSession::environmentBase"/>) when 15999 creating the process. (This is done on the guest side of things in 16000 order to be compatible with older Guest Additions. That is one of 16001 the motivations for not passing in the whole environment here.) 16002 </desc> 16003 </param> 16004 <param name="flags" type="ProcessCreateFlag" dir="in" safearray="yes"> 16005 <desc> 16006 Process creation flags; 16007 see <link to="ProcessCreateFlag"/> for more information. 16008 </desc> 16009 </param> 16010 <param name="timeoutMS" type="unsigned long" dir="in"> 16011 <desc> 16012 Timeout (in ms) for limiting the guest process' running time. 16013 Pass 0 for an infinite timeout. On timeout the guest process will be 16014 killed and its status will be put to an appropriate value. See 16015 <link to="ProcessStatus"/> for more information. 16016 </desc> 16017 </param> 16018 <param name="guestProcess" type="IGuestProcess" dir="return"> 16019 <desc>Guest process object of the newly created process.</desc> 16020 </param> 16021 </method> 16022 16023 <method name="processCreateEx"> 16024 <desc> 16025 Creates a new process running in the guest with the extended options 16026 for setting the process priority and affinity. 16027 16028 See <link to="IGuestSession::processCreate"/> for more information. 16029 </desc> 16041 16030 <param name="executable" type="wstring" dir="in"> 16042 16031 <desc> … … 16056 16045 <link to="IGuestSession::protocolVersion"/> is 3 or higher. 16057 16046 </note> 16047 </desc> 16048 </param> 16049 <param name="cwd" type="wstring" dir="in"> 16050 <desc> 16051 Path to the directory in which to execute in the guest. The 16052 directory has to exist in the guest VM with search rights to the 16053 session user in order to succeed. If empty/null, the session 16054 user's default (typically 'home') directory is used. If not a 16055 full path, it is interpreted relative to the default directory; 16056 e.g. 'work' means '$HOME/work' (according to the guest's '$HOME'- 16057 like concept). 16058 16058 </desc> 16059 16059 </param> -
trunk/src/VBox/Main/include/GuestSessionImpl.h
r99120 r99150 212 212 ULONG aMode); 213 213 HRESULT processCreate(const com::Utf8Str &aCommand, 214 const std::vector<com::Utf8Str> &aArguments, 214 215 const com::Utf8Str &aCwd, 215 const std::vector<com::Utf8Str> &aArguments,216 216 const std::vector<com::Utf8Str> &aEnvironment, 217 217 const std::vector<ProcessCreateFlag_T> &aFlags, … … 219 219 ComPtr<IGuestProcess> &aGuestProcess); 220 220 HRESULT processCreateEx(const com::Utf8Str &aCommand, 221 const std::vector<com::Utf8Str> &aArguments, 221 222 const com::Utf8Str &aCwd, 222 const std::vector<com::Utf8Str> &aArguments,223 223 const std::vector<com::Utf8Str> &aEnvironment, 224 224 const std::vector<ProcessCreateFlag_T> &aFlags, -
trunk/src/VBox/Main/src-client/GuestSessionImpl.cpp
r99122 r99150 4943 4943 4944 4944 4945 HRESULT GuestSession::processCreate(const com::Utf8Str &aExecutable, const com::Utf8Str &aCwd,4946 const std::vector<com::Utf8Str> &aArguments,4945 HRESULT GuestSession::processCreate(const com::Utf8Str &aExecutable, const std::vector<com::Utf8Str> &aArguments, 4946 const com::Utf8Str &aCwd, 4947 4947 const std::vector<com::Utf8Str> &aEnvironment, 4948 4948 const std::vector<ProcessCreateFlag_T> &aFlags, … … 4952 4952 4953 4953 std::vector<LONG> affinityIgnored; 4954 return processCreateEx(aExecutable, a Cwd, aArguments, aEnvironment, aFlags, aTimeoutMS,4954 return processCreateEx(aExecutable, aArguments, aCwd, aEnvironment, aFlags, aTimeoutMS, 4955 4955 ProcessPriority_Default, affinityIgnored, aGuestProcess); 4956 4956 } 4957 4957 4958 HRESULT GuestSession::processCreateEx(const com::Utf8Str &aExecutable, const com::Utf8Str &aCwd,4959 const std::vector<com::Utf8Str> &aArguments,4958 HRESULT GuestSession::processCreateEx(const com::Utf8Str &aExecutable, const std::vector<com::Utf8Str> &aArguments, 4959 const com::Utf8Str &aCwd, 4960 4960 const std::vector<com::Utf8Str> &aEnvironment, 4961 4961 const std::vector<ProcessCreateFlag_T> &aFlags, ULONG aTimeoutMS, -
trunk/src/VBox/ValidationKit/tests/additions/tdAddGuestCtrl.py
r99129 r99150 2320 2320 try: 2321 2321 if self.oTstDrv.fpApiVer >= 7.1: 2322 oProcess = oGuestSession.processCreate(oTest.sCmd, oTest.sCwd,2322 oProcess = oGuestSession.processCreate(oTest.sCmd, 2323 2323 oTest.asArgs if self.oTstDrv.fpApiVer >= 5.0 else oTest.asArgs[1:], 2324 oTest.sCwd, 2324 2325 oTest.aEnv, oTest.afFlags, oTest.timeoutMS); 2325 2326 else: … … 2888 2889 reporter.log2('Starting stale process #%d...' % (i)); 2889 2890 if self.oTstDrv.fpApiVer >= 7.1: 2890 oGuestSession.processCreate(sShell, "",2891 oGuestSession.processCreate(sShell, 2891 2892 asArgs if self.oTstDrv.fpApiVer >= 5.0 else asArgs[1:], [], 2893 "", # Working directory. 2892 2894 [ vboxcon.ProcessCreateFlag_WaitForStdOut ], 30 * 1000); 2893 2895 else: … … 2927 2929 reporter.log2('Starting non-stale process #%d...' % (i)); 2928 2930 if self.oTstDrv.fpApiVer >= 7.1: 2929 oCurProc = oGuestSession.processCreate(sShell, "", asArgs if self.oTstDrv.fpApiVer >= 5.0 else asArgs[1:], 2931 oCurProc = oGuestSession.processCreate(sShell, asArgs if self.oTstDrv.fpApiVer >= 5.0 else asArgs[1:], 2932 "", # Working directory. 2930 2933 [], [], 0); # Infinite timeout. 2931 2934 else: … … 2984 2987 reporter.log2('Starting blocking process #%d...' % (i)); 2985 2988 if self.oTstDrv.fpApiVer >= 7.1: 2986 oCurProc = oGuestSession.processCreate(sCmd, "", asArgs if self.oTstDrv.fpApiVer >= 5.0 else asArgs[1:], 2989 oCurProc = oGuestSession.processCreate(sCmd, asArgs if self.oTstDrv.fpApiVer >= 5.0 else asArgs[1:], 2990 "", # Working directory. 2987 2991 [], [], 30 * 1000); 2988 2992 else: … … 3419 3423 try: 3420 3424 if self.oTstDrv.fpApiVer >= 7.1: 3421 oGuestProcess = oGuestSession.processCreate(sImage, "",3425 oGuestProcess = oGuestSession.processCreate(sImage, 3422 3426 asArgs if self.oTstDrv.fpApiVer >= 5.0 else asArgs[1:], aEnv, afFlags, 3427 "", # Working directory. 3423 3428 30 * 1000); 3424 3429 else: … … 3540 3545 try: 3541 3546 if self.oTstDrv.fpApiVer >= 7.1: 3542 oCurProcess = oGuestSession.processCreate(sShell, "", [sShell,] if self.oTstDrv.fpApiVer >= 5.0 else [], 3547 oCurProcess = oGuestSession.processCreate(sShell, [sShell,] if self.oTstDrv.fpApiVer >= 5.0 else [], 3548 "", # Working directory. 3543 3549 [], [], 30 * 1000); 3544 3550 else: … … 3582 3588 try: 3583 3589 if self.oTstDrv.fpApiVer >= 7.1: 3584 oCurProcess = oGuestSession.processCreate(sShell, "", [sShell,] if self.oTstDrv.fpApiVer >= 5.0 else [], 3585 [], [], 3 * 1000); 3590 oCurProcess = oGuestSession.processCreate(sShell, [sShell,] if self.oTstDrv.fpApiVer >= 5.0 else [], 3591 "", # Working directory. 3592 [], [], 3 * 1000); 3586 3593 else: 3587 3594 oCurProcess = oGuestSession.processCreate(sShell, [sShell,] if self.oTstDrv.fpApiVer >= 5.0 else [], … … 5577 5584 5578 5585 for _ in xrange(100): 5579 oProc = oGuestSession.processCreate(sCmd, "", asArgs if self.fpApiVer >= 5.0 else asArgs[1:], 5586 oProc = oGuestSession.processCreate(sCmd, asArgs if self.fpApiVer >= 5.0 else asArgs[1:], 5587 "", # Working directory. 5580 5588 aEnv, afFlags, 30 * 1000); 5581 5589
Note:
See TracChangeset
for help on using the changeset viewer.

