Changeset 39991 in vbox for trunk/src/VBox/Main/src-client
- Timestamp:
- Feb 3, 2012 4:45:00 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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.