Changeset 39991 in vbox for trunk/src/VBox
- Timestamp:
- Feb 3, 2012 4:45:00 PM (13 years ago)
- Location:
- trunk/src/VBox
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxManage/VBoxManageGuestCtrl.cpp
r39843 r39991 875 875 ULONG uRetExitCode, uRetFlags; 876 876 rc = pGuest->GetProcessStatus(uPID, &uRetExitCode, &uRetFlags, &retStatus); 877 if (SUCCEEDED(rc) && fVerbose) 878 RTPrintf("Exit code=%u (Status=%u [%s], Flags=%u)\n", uRetExitCode, retStatus, ctrlExecProcessStatusToText(retStatus), uRetFlags); 879 rcProc = ctrlExecProcessStatusToExitCode(retStatus, uRetExitCode); 877 if (SUCCEEDED(rc)) 878 { 879 if (fVerbose) 880 RTPrintf("Exit code=%u (Status=%u [%s], Flags=%u)\n", uRetExitCode, retStatus, ctrlExecProcessStatusToText(retStatus), uRetFlags); 881 rcProc = ctrlExecProcessStatusToExitCode(retStatus, uRetExitCode); 882 } 883 else 884 { 885 ctrlPrintError(pGuest, COM_IIDOF(IGuest)); 886 rcProc = RTEXITCODE_FAILURE; 887 } 880 888 } 881 889 } -
trunk/src/VBox/Main/include/GuestImpl.h
r39890 r39991 248 248 typedef std::map< uint32_t, VBOXGUESTCTRL_PROCESS >::const_iterator GuestProcessMapIterConst; 249 249 250 int processGetStatus(uint32_t u32PID, PVBOXGUESTCTRL_PROCESS pProcess );250 int processGetStatus(uint32_t u32PID, PVBOXGUESTCTRL_PROCESS pProcess, bool fRemove); 251 251 int processSetStatus(uint32_t u32PID, ExecuteProcessStatus_T enmStatus, uint32_t uExitCode, uint32_t uFlags); 252 252 -
trunk/src/VBox/Main/src-client/GuestCtrlImpl.cpp
r39957 r39991 994 994 * 995 995 * @return IPRT status code. 996 * @param u32PID 997 * @param pProcess 996 * @param u32PID PID of process to get status for. 997 * @param pProcess Where to store the process information. 998 * @param fRemove Flag indicating whether to remove the 999 * process from the map when process marked a 1000 * exited/terminated. 998 1001 */ 999 int Guest::processGetStatus(uint32_t u32PID, PVBOXGUESTCTRL_PROCESS pProcess) 1002 int Guest::processGetStatus(uint32_t u32PID, PVBOXGUESTCTRL_PROCESS pProcess, 1003 bool fRemove) 1000 1004 { 1001 1005 AssertReturn(u32PID, VERR_INVALID_PARAMETER); … … 1015 1019 /* If the is marked as stopped/terminated 1016 1020 * remove it from the map. */ 1017 if (it->second.mStatus != ExecuteProcessStatus_Started) 1021 if ( fRemove 1022 && it->second.mStatus != ExecuteProcessStatus_Started) 1023 { 1018 1024 mGuestProcessMap.erase(it); 1025 } 1019 1026 1020 1027 return VINF_SUCCESS; … … 1861 1868 { 1862 1869 VBOXGUESTCTRL_PROCESS process; 1863 int vrc = processGetStatus(aPID, &process );1870 int vrc = processGetStatus(aPID, &process, false /* Don't remove */); 1864 1871 if (RT_SUCCESS(vrc)) 1865 1872 { … … 2065 2072 { 2066 2073 VBOXGUESTCTRL_PROCESS proc; 2067 int vrc = processGetStatus(aPID, &proc );2074 int vrc = processGetStatus(aPID, &proc, false /* Don't remove */); 2068 2075 if (RT_FAILURE(vrc)) 2069 2076 { … … 2234 2241 { 2235 2242 VBOXGUESTCTRL_PROCESS process; 2236 int vrc = processGetStatus(aPID, &process); 2243 int vrc = processGetStatus(aPID, &process, 2244 true /* Remove when terminated */); 2237 2245 if (RT_SUCCESS(vrc)) 2238 2246 {
Note:
See TracChangeset
for help on using the changeset viewer.