Lines Matching refs:vrc
183 int vrc = bindToSession(aConsole, aSession, aProcessID /* Object ID */);
184 if (RT_SUCCESS(vrc))
188 vrc = VERR_NO_MEMORY;
193 vrc = VERR_COM_UNEXPECTED;
197 if (RT_SUCCESS(vrc))
218 vrc = baseInit();
219 if (RT_SUCCESS(vrc))
225 vrc = VERR_COM_UNEXPECTED;
228 vrc = VERR_COM_UNEXPECTED;
232 vrc = VERR_NO_MEMORY;
236 if (RT_SUCCESS(vrc))
248 return vrc;
252 return vrc;
273 int vrc = i_terminateProcess(30 * 1000, &guestRc); /** @todo Make timeouts configurable. */
280 vrc, guestRc));
414 int vrc;
419 vrc = i_onGuestDisconnected(pCbCtx, pSvcCb);
425 vrc = i_onProcessStatusChange(pCbCtx, pSvcCb);
431 vrc = i_onProcessOutput(pCbCtx, pSvcCb);
437 vrc = i_onProcessInputStatus(pCbCtx, pSvcCb);
443 vrc = VERR_NOT_SUPPORTED;
448 LogFlowFuncLeaveRC(vrc);
450 return vrc;
578 int vrc = i_setProcessStatus(ProcessStatus_Down, VINF_SUCCESS);
580 LogFlowFuncLeaveRC(vrc);
581 return vrc;
595 int vrc = pSvcCbData->mpaParms[1].getUInt32(&dataCb.uPID);
596 AssertRCReturn(vrc, vrc);
597 vrc = pSvcCbData->mpaParms[2].getUInt32(&dataCb.uStatus);
598 AssertRCReturn(vrc, vrc);
599 vrc = pSvcCbData->mpaParms[3].getUInt32(&dataCb.uFlags);
600 AssertRCReturn(vrc, vrc);
601 vrc = pSvcCbData->mpaParms[4].getUInt32(&dataCb.uProcessed);
602 AssertRCReturn(vrc, vrc);
607 vrc = i_checkPID(dataCb.uPID);
608 if (RT_SUCCESS(vrc))
647 LogFlowFuncLeaveRC(vrc);
648 return vrc;
669 int vrc = pSvcCbData->mpaParms[1].getUInt32(&dataCb.uPID);
670 AssertRCReturn(vrc, vrc);
671 vrc = pSvcCbData->mpaParms[2].getUInt32(&dataCb.uStatus);
672 AssertRCReturn(vrc, vrc);
673 vrc = pSvcCbData->mpaParms[3].getUInt32(&dataCb.uFlags);
674 AssertRCReturn(vrc, vrc);
675 vrc = pSvcCbData->mpaParms[4].getPointer(&dataCb.pvData, &dataCb.cbData);
676 AssertRCReturn(vrc, vrc);
681 vrc = i_checkPID(dataCb.uPID);
682 if (RT_SUCCESS(vrc))
757 vrc, procStatus, procRc));
761 if (RT_SUCCESS(vrc))
762 vrc = rc2;
765 LogFlowFuncLeaveRC(vrc);
766 return vrc;
778 int vrc = pSvcCbData->mpaParms[1].getUInt32(&dataCb.uPID);
779 AssertRCReturn(vrc, vrc);
780 vrc = pSvcCbData->mpaParms[2].getUInt32(&dataCb.uHandle);
781 AssertRCReturn(vrc, vrc);
782 vrc = pSvcCbData->mpaParms[3].getUInt32(&dataCb.uFlags);
783 AssertRCReturn(vrc, vrc);
784 vrc = pSvcCbData->mpaParms[4].getPointer(&dataCb.pvData, &dataCb.cbData);
785 AssertRCReturn(vrc, vrc);
790 vrc = i_checkPID(dataCb.uPID);
791 if (RT_SUCCESS(vrc))
801 LogFlowFuncLeaveRC(vrc);
802 return vrc;
815 int vrc = VINF_SUCCESS;
829 LogFlowFuncLeaveRC(vrc);
830 return vrc;
862 int vrc;
879 vrc = registerWaitEvent(eventTypes, &pEvent);
883 vrc = VERR_NO_MEMORY;
886 if (RT_FAILURE(vrc))
887 return vrc;
889 if (RT_SUCCESS(vrc))
900 vrc = sendCommand(HOST_EXEC_GET_OUTPUT, i, paParms);
903 if (RT_SUCCESS(vrc))
904 vrc = i_waitForOutput(pEvent, uHandle, uTimeoutMS,
909 LogFlowFuncLeaveRC(vrc);
910 return vrc;
999 int vrc;
1007 vrc = registerWaitEvent(eventTypes, &pEvent);
1011 vrc = VERR_NO_MEMORY;
1014 if (RT_FAILURE(vrc))
1015 return vrc;
1026 vrc = VERR_BUFFER_OVERFLOW;
1028 if ( RT_SUCCESS(vrc)
1034 for (size_t i = 0; i < cArgs && RT_SUCCESS(vrc); i++)
1038 vrc = RTStrDupEx(&papszArgv[i], pszCurArg);
1042 if (RT_SUCCESS(vrc))
1043 vrc = RTGetOptArgvToString(&pszArgs, papszArgv, RTGETOPTARGV_CNV_QUOTE_MS_CRT);
1056 if (RT_SUCCESS(vrc))
1062 if (RT_SUCCESS(vrc))
1063 vrc = mData.mProcess.mEnvironment.BuildEnvironmentBlock(&pvEnv, &cbEnv, NULL /* cEnv */);
1065 if (RT_SUCCESS(vrc))
1112 vrc = sendCommand(HOST_EXEC_CMD, i, paParms);
1113 if (RT_FAILURE(vrc))
1115 int rc2 = i_setProcessStatus(ProcessStatus_Error, vrc);
1124 if (RT_SUCCESS(vrc))
1125 vrc = i_waitForStatusChange(pEvent, uTimeoutMS,
1129 LogFlowFuncLeaveRC(vrc);
1130 return vrc;
1137 int vrc;
1146 vrc = RTThreadCreate(NULL, GuestProcess::i_startProcessThread,
1150 if (RT_SUCCESS(vrc))
1158 vrc = VERR_NO_MEMORY;
1161 LogFlowFuncLeaveRC(vrc);
1162 return vrc;
1179 int vrc = pProcess->i_startProcess(30 * 1000 /* 30s timeout */,
1183 LogFlowFunc(("pProcess=%p returning rc=%Rrc\n", (GuestProcess *)pProcess, vrc));
1184 return vrc;
1194 int vrc = VINF_SUCCESS;
1207 vrc = VERR_NOT_SUPPORTED;
1209 if (RT_SUCCESS(vrc))
1217 vrc = registerWaitEvent(eventTypes, &pEvent);
1221 vrc = VERR_NO_MEMORY;
1224 if (RT_FAILURE(vrc))
1225 return vrc;
1234 vrc = sendCommand(HOST_EXEC_TERMINATE, i, paParms);
1235 if (RT_SUCCESS(vrc))
1236 vrc = i_waitForStatusChange(pEvent, uTimeoutMS,
1242 LogFlowFuncLeaveRC(vrc);
1243 return vrc;
1392 int vrc;
1400 vrc = registerWaitEvent(eventTypes, &pEvent);
1404 vrc = VERR_NO_MEMORY;
1407 if (RT_FAILURE(vrc))
1408 return vrc;
1423 vrc = VERR_TIMEOUT;
1427 vrc = i_waitForStatusChange(pEvent,
1431 if (RT_SUCCESS(vrc))
1453 waitResult, newStatus, vrc));
1454 return vrc;
1464 int vrc = waitForEvent(pEvent, uTimeoutMS,
1466 if (RT_SUCCESS(vrc))
1485 vrc = VWRN_GSTCTL_OBJECTSTATE_CHANGED;
1489 pEvent, uHandle, vrc));
1490 return vrc;
1504 int vrc;
1510 vrc = waitForEvent(pEvent, uTimeoutMS,
1512 if (RT_SUCCESS(vrc))
1538 vrc = VERR_BUFFER_OVERFLOW;
1541 cbRead, uHandleEvent, vrc));
1545 if ( RT_SUCCESS(vrc)
1557 vrc = VERR_COM_UNEXPECTED;
1560 vrc = VWRN_GSTCTL_OBJECTSTATE_CHANGED;
1563 } while (vrc == VINF_SUCCESS);
1565 if ( vrc != VINF_SUCCESS
1571 LogFlowFuncLeaveRC(vrc);
1572 return vrc;
1584 int vrc = waitForEvent(pEvent, uTimeoutMS,
1586 if (RT_SUCCESS(vrc))
1610 vrc = VERR_GSTCTL_GUEST_ERROR;
1616 LogFlowFuncLeaveRC(vrc);
1617 return vrc;
1668 int vrc;
1685 vrc = registerWaitEvent(eventTypes, &pEvent);
1689 vrc = VERR_NO_MEMORY;
1692 if (RT_FAILURE(vrc))
1693 return vrc;
1706 vrc = sendCommand(HOST_EXEC_SET_INPUT, i, paParms);
1707 if (RT_SUCCESS(vrc))
1710 vrc = i_waitForInputNotify(pEvent, uHandle, uTimeoutMS,
1712 if (RT_SUCCESS(vrc))
1725 cbProcessed, vrc));
1726 return vrc;
1747 int vrc = i_readData(aHandle, aToRead, aTimeoutMS, &aData.front(), aToRead, &cbRead, &guestRc);
1748 if (RT_SUCCESS(vrc))
1757 switch (vrc)
1766 mData.mProcess.mCommand.c_str(), mData.mPID, vrc);
1771 LogFlowThisFunc(("rc=%Rrc, cbRead=%RU32\n", vrc, cbRead));
1773 LogFlowFuncLeaveRC(vrc);
1787 int vrc = i_terminateProcess(30 * 1000 /* Timeout in ms */,
1789 if (RT_FAILURE(vrc))
1791 switch (vrc)
1806 mData.mProcess.mCommand.c_str(), mData.mPID, vrc);
1815 if (RT_SUCCESS(vrc))
1816 vrc = rc2;
1818 LogFlowFuncLeaveRC(vrc);
1837 int vrc = i_waitFor(aWaitFor, aTimeoutMS, waitResult, &guestRc);
1838 if (RT_SUCCESS(vrc))
1844 switch (vrc)
1857 mData.mProcess.mCommand.c_str(), mData.mPID, vrc);
1862 LogFlowFuncLeaveRC(vrc);
1897 int vrc = i_writeData(aHandle, aFlags, pvData, cbData, aTimeoutMS, &cbWritten, &guestRc);
1898 if (RT_FAILURE(vrc))
1900 switch (vrc)
1909 mData.mProcess.mCommand.c_str(), mData.mPID, vrc);
1914 LogFlowThisFunc(("rc=%Rrc, aWritten=%RU32\n", vrc, cbWritten));
1918 LogFlowFuncLeaveRC(vrc);
1969 int vrc = pSession->i_processCreateExInteral(mStartupInfo, pProcess);
1970 if (RT_SUCCESS(vrc))
1971 vrc = fAsync
1975 if ( RT_SUCCESS(vrc)
1982 vrc = VERR_GSTCTL_GUEST_ERROR;
1985 LogFlowFuncLeaveRC(vrc);
1986 return vrc;
2000 int vrc;
2004 vrc = mStdOut.ParseBlock(strmBlock);
2007 } while (RT_SUCCESS(vrc));
2010 vrc, strmBlock.GetCount()));
2011 return vrc;
2050 int vrc = procTool.Init(pGuestSession, startupInfo, false /* Async */, &guestRc);
2051 if (RT_SUCCESS(vrc))
2058 vrc = procTool.i_waitEx( pStrmOutObjects
2066 vrc = VERR_NO_MEMORY;
2071 if (RT_SUCCESS(vrc))
2074 vrc = procTool.i_wait(GUESTPROCESSTOOL_FLAG_NONE, &guestRc);
2075 if (RT_SUCCESS(vrc))
2079 vrc = VERR_GSTCTL_GUEST_ERROR;
2086 LogFlowFunc(("Returned rc=%Rrc, guestRc=%Rrc\n", vrc, guestRc));
2087 return vrc;
2095 int vrc;
2105 vrc = (exitCode != 0)
2110 vrc = VERR_INVALID_STATE; /** @todo Special guest control rc needed! */
2112 LogFlowFuncLeaveRC(vrc);
2113 return vrc;
2127 int vrc;
2131 vrc = i_getCurrentBlock(OUTPUT_HANDLE_ID_STDOUT, *pStrmBlkOut);
2132 if (RT_SUCCESS(vrc))
2133 return vrc;
2166 vrc = VERR_TIMEOUT; \
2183 vrc = pProcess->i_waitFor(fWaitFlags, GET_REMAINING_TIME,
2185 if (RT_FAILURE(vrc))
2191 vrc = VERR_NOT_IMPLEMENTED;
2213 vrc = VERR_GSTCTL_GUEST_ERROR;
2221 vrc = VERR_TIMEOUT;
2234 if (RT_FAILURE(vrc))
2242 vrc = pProcess->i_readData(OUTPUT_HANDLE_ID_STDOUT, sizeof(byBuf),
2246 if ( RT_FAILURE(vrc)
2247 || vrc == VWRN_GSTCTL_OBJECTSTATE_CHANGED)
2253 vrc = mStdOut.AddData(byBuf, cbRead);
2255 if ( RT_SUCCESS(vrc)
2259 vrc = i_getCurrentBlock(OUTPUT_HANDLE_ID_STDOUT, *pStrmBlkOut);
2263 if (RT_SUCCESS(vrc))
2276 vrc = pProcess->i_readData(OUTPUT_HANDLE_ID_STDERR, sizeof(byBuf),
2280 if ( RT_FAILURE(vrc)
2281 || vrc == VWRN_GSTCTL_OBJECTSTATE_CHANGED)
2287 vrc = mStdErr.AddData(byBuf, cbRead);
2293 } while (!fDone && RT_SUCCESS(vrc));
2299 vrc = VERR_GSTCTL_GUEST_ERROR;
2302 vrc, guestRc, waitRes));
2306 LogFlowFuncLeaveRC(vrc);
2307 return vrc;