- Timestamp:
- Apr 9, 2010 10:02:00 AM (15 years ago)
- Location:
- trunk/src/VBox
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxManage/VBoxManageGuestCtrl.cpp
r28032 r28132 65 65 " <path to program> [--arguments \"<arguments>\"] [--environment \"NAME=VALUE NAME=VALUE\"]\n" 66 66 " [--flags <flags>] [--username <name> [--password <password>]]\n" 67 " [--timeout <msec>] \n"67 " [--timeout <msec>] [--wait stdout[,[stderr]]]\n" 68 68 "\n"); 69 69 } … … 91 91 Utf8Str Utf8Password; 92 92 uint32_t uTimeoutMS = 0; 93 bool waitForOutput = false; 93 94 94 95 /* Iterate through all possible commands (if available). */ … … 175 176 else 176 177 ++i; 178 } 179 else if (!strcmp(a->argv[i], "--wait")) 180 { 181 if (i + 1 >= a->argc) 182 usageOK = false; 183 else 184 { 185 /** @todo Check for "stdout" or "stderr"! */ 186 waitForOutput = true; 187 ++i; 188 } 177 189 } 178 190 /** @todo Add fancy piping stuff here. */ … … 231 243 Bstr(Utf8UserName), Bstr(Utf8Password), uTimeoutMS, 232 244 &uPID, progress.asOutParam())); 245 if (waitForOutput) 246 { 247 248 } 233 249 /** @todo Show some progress here? */ 234 250 a->session->Close(); -
trunk/src/VBox/HostServices/GuestControl/service.cpp
r28087 r28132 453 453 rc = execBufferAssign(&curCmd.parmBuf, cParms, paParms); 454 454 if (RT_SUCCESS(rc)) 455 { 456 execBufferFree(&curCmd.parmBuf); 455 457 mHostCmds.pop_front(); 458 } 456 459 } 457 460 } … … 487 490 int rc = VINF_SUCCESS; 488 491 489 HostCmd newCmd;490 execBufferAllocate(&newCmd.parmBuf, cParms, paParms);491 mHostCmds.push_back(newCmd);492 493 /* Limit list size by deleting oldest element. */494 if (mHostCmds.size() > 256) /** @todo Use a define! */495 mHostCmds.pop_front();496 497 492 /* Some lazy guests to wake up? */ 498 493 if (!mGuestWaiters.empty()) … … 501 496 rc = hostNotifyGuest(&curCall, eFunction, cParms, paParms); 502 497 mGuestWaiters.pop_front(); 498 } 499 else /* No guests waiting, buffer it */ 500 { 501 HostCmd newCmd; 502 rc = execBufferAllocate(&newCmd.parmBuf, cParms, paParms); 503 if (RT_SUCCESS(rc)) 504 { 505 mHostCmds.push_back(newCmd); 506 507 /* Limit list size by deleting oldest element. */ 508 if (mHostCmds.size() > 256) /** @todo Use a define! */ 509 mHostCmds.pop_front(); 510 } 503 511 } 504 512 return rc; -
trunk/src/VBox/Main/GuestImpl.cpp
r28051 r28132 26 26 #include "Global.h" 27 27 #include "ConsoleImpl.h" 28 #include "ProgressImpl.h" 28 29 #include "VMMDev.h" 29 30 … … 448 449 449 450 CheckComArgStrNotEmptyOrNull(aCommand); 451 CheckComArgOutPointerValid(aPID); 450 452 CheckComArgOutPointerValid(aProgress); 451 CheckComArgOutPointerValid(aPID); 452 /* Flags are not supported at the moment. */ 453 if (aFlags != 0) 453 if (aFlags != 0) /* Flags are not supported at the moment. */ 454 454 return E_INVALIDARG; 455 455 … … 461 461 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 462 462 463 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); 464 465 /* Just be on the safe side when calling another process. */ 466 alock.leave(); 467 468 HRESULT rc = E_UNEXPECTED; 469 using namespace guestControl; 470 463 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); 464 465 /* 466 * Create progress object. 467 */ 468 #if 0 469 ComObjPtr <Progress> progress; 470 progress.createObject(); 471 HRESULT rc = progress->init(/** @todo How to get the machine here? */ 472 static_cast<IGuest*>(this), 473 BstrFmt(tr("Executing process")), 474 FALSE); 475 if (FAILED(rc)) return rc; 476 #endif 477 478 /* 479 * Prepare process execution. 480 */ 471 481 int vrc = VINF_SUCCESS; 472 482 Utf8Str Utf8Command(aCommand); … … 547 557 } 548 558 if (RT_SUCCESS(vrc)) 559 { 560 #if 0 561 progress.queryInterfaceTo(aProgress); 562 #endif 549 563 rc = S_OK; 564 } 550 565 else 551 566 rc = setError(E_UNEXPECTED,
Note:
See TracChangeset
for help on using the changeset viewer.