Changeset 29645 in vbox for trunk/src/VBox
- Timestamp:
- May 18, 2010 3:41:46 PM (15 years ago)
- Location:
- trunk/src/VBox
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxManage/VBoxManageGuestCtrl.cpp
r29585 r29645 442 442 443 443 BOOL fCanceled; 444 CHECK_ERROR_RET(progress, COMGETTER(Canceled)(&fCanceled), rc); 445 if (fCanceled) 446 { 447 RTPrintf("Process execution canceled!\n"); 448 } 449 else 450 { 451 if (fCompleted) 452 { 453 LONG iRc = false; 454 CHECK_ERROR_RET(progress, COMGETTER(ResultCode)(&iRc), rc); 455 if (FAILED(iRc)) 456 { 457 ComPtr<IVirtualBoxErrorInfo> execError; 458 rc = progress->COMGETTER(ErrorInfo)(execError.asOutParam()); 459 com::ErrorInfo info (execError); 460 RTPrintf("\n\nProcess error details:\n"); 461 GluePrintErrorInfo(info); 462 RTPrintf("\n"); 463 } 464 if (fVerbose) 465 { 466 ULONG uRetStatus, uRetExitCode, uRetFlags; 467 CHECK_ERROR_BREAK(guest, GetProcessStatus(uPID, &uRetExitCode, &uRetFlags, &uRetStatus)); 468 RTPrintf("Exit code=%u (Status=%u [%s], Flags=%u)\n", uRetExitCode, uRetStatus, getStatus(uRetStatus), uRetFlags); 469 } 444 if (SUCCEEDED(progress->COMGETTER(Canceled)(&fCanceled)) && fCanceled) 445 if (fVerbose) RTPrintf("Process execution canceled!\n"); 446 447 if (fCompleted) 448 { 449 LONG iRc = false; 450 CHECK_ERROR_RET(progress, COMGETTER(ResultCode)(&iRc), rc); 451 if (FAILED(iRc)) 452 { 453 ComPtr<IVirtualBoxErrorInfo> execError; 454 rc = progress->COMGETTER(ErrorInfo)(execError.asOutParam()); 455 com::ErrorInfo info (execError); 456 RTPrintf("\n\nProcess error details:\n"); 457 GluePrintErrorInfo(info); 458 RTPrintf("\n"); 459 } 460 if (fVerbose) 461 { 462 ULONG uRetStatus, uRetExitCode, uRetFlags; 463 CHECK_ERROR_BREAK(guest, GetProcessStatus(uPID, &uRetExitCode, &uRetFlags, &uRetStatus)); 464 RTPrintf("Exit code=%u (Status=%u [%s], Flags=%u)\n", uRetExitCode, uRetStatus, getStatus(uRetStatus), uRetFlags); 470 465 } 471 466 } -
trunk/src/VBox/Main/GuestImpl.cpp
r29641 r29645 707 707 it->pvData = NULL; 708 708 it->cbData = 0; 709 710 /* Notify outstanding waits for progress ... */ 711 if (!it->pProgress.isNull())712 {713 /* Only cancel if not canceled before! */714 BOOL fCancelled;715 if (SUCCEEDED(it->pProgress->COMGETTER(Canceled)(&fCancelled)) && !fCancelled)716 it->pProgress->Cancel();717 /*718 * Do *not NULL pProgress here, because waiting function like executeProcess()719 * will still rely on this object for checking whether they have to give up!720 */721 }709 } 710 711 /* Notify outstanding waits for progress ... */ 712 if (it->pProgress && !it->pProgress.isNull()) 713 { 714 /* Only cancel if not canceled before! */ 715 BOOL fCancelled; 716 if (SUCCEEDED(it->pProgress->COMGETTER(Canceled)(&fCancelled)) && !fCancelled) 717 it->pProgress->Cancel(); 718 /* 719 * Do *not NULL pProgress here, because waiting function like executeProcess() 720 * will still rely on this object for checking whether they have to give up! 721 */ 722 722 } 723 723 LogFlowFuncLeave();
Note:
See TracChangeset
for help on using the changeset viewer.