Changeset 84923 in vbox for trunk/src/VBox/ValidationKit/utils
- Timestamp:
- Jun 24, 2020 8:57:02 AM (5 years ago)
- svn:sync-xref-src-repo-rev:
- 138795
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/utils/TestExecServ/TestExecService.cpp
r84922 r84923 2790 2790 if (RT_SUCCESS(rc)) 2791 2791 { 2792 /* 2793 * Create the process. 2794 */ 2795 if (g_fDisplayOutput) 2792 char *pszExecResolved = RTPathRealDup(pszExecName); 2793 if (pszExecResolved) 2796 2794 { 2797 RTPrintf("txs: Executing \"%s\": ", pszExecName);2798 for (uint32_t i = 0; i < cArgs; i++)2799 RTPrintf(" \"%s\"", papszArgs[i]);2800 RTPrintf("\n");2801 }2802 rc = RTProcCreateEx(pszExecName, papszArgs, pTxsExec->hEnv, 0 /*fFlags*/,2803 pTxsExec->StdIn.phChild, pTxsExec->StdOut.phChild, pTxsExec->StdErr.phChild,2804 *pszUsername ? pszUsername : NULL, NULL, NULL,2805 &pTxsExec->hProcess);2806 if (RT_SUCCESS(rc))2807 {2808 ASMAtomicWriteBool(&pTxsExec->fProcessAlive, true);2809 rc2 = RTThreadUserSignal(pTxsExec->hThreadWaiter); AssertRC(rc2);2810 2811 2795 /* 2812 * C lose the child ends of any pipes and redirected files.2796 * Create the process. 2813 2797 */ 2814 rc2 = RTHandleClose(pTxsExec->StdIn.phChild); AssertRC(rc2); 2815 pTxsExec->StdIn.phChild = NULL; 2816 rc2 = RTHandleClose(pTxsExec->StdOut.phChild); AssertRC(rc2); 2817 pTxsExec->StdOut.phChild = NULL; 2818 rc2 = RTHandleClose(pTxsExec->StdErr.phChild); AssertRC(rc2); 2819 pTxsExec->StdErr.phChild = NULL; 2820 rc2 = RTPipeClose(pTxsExec->hTestPipeW); AssertRC(rc2); 2821 pTxsExec->hTestPipeW = NIL_RTPIPE; 2822 2823 /* 2824 * Let another worker function funnel output and input to the 2825 * client as well as the process exit code. 2826 */ 2827 rc = txsDoExecHlp2(pTxsExec); 2798 if (g_fDisplayOutput) 2799 { 2800 RTPrintf("txs: Executing \"%s\" -> \"%s\": ", pszExecName, pszExecResolved); 2801 for (uint32_t i = 0; i < cArgs; i++) 2802 RTPrintf(" \"%s\"", papszArgs[i]); 2803 RTPrintf("\n"); 2804 } 2805 2806 rc = RTProcCreateEx(pszExecResolved, papszArgs, pTxsExec->hEnv, 0 /*fFlags*/, 2807 pTxsExec->StdIn.phChild, pTxsExec->StdOut.phChild, pTxsExec->StdErr.phChild, 2808 *pszUsername ? pszUsername : NULL, NULL, NULL, 2809 &pTxsExec->hProcess); 2810 if (RT_SUCCESS(rc)) 2811 { 2812 ASMAtomicWriteBool(&pTxsExec->fProcessAlive, true); 2813 rc2 = RTThreadUserSignal(pTxsExec->hThreadWaiter); AssertRC(rc2); 2814 2815 /* 2816 * Close the child ends of any pipes and redirected files. 2817 */ 2818 rc2 = RTHandleClose(pTxsExec->StdIn.phChild); AssertRC(rc2); 2819 pTxsExec->StdIn.phChild = NULL; 2820 rc2 = RTHandleClose(pTxsExec->StdOut.phChild); AssertRC(rc2); 2821 pTxsExec->StdOut.phChild = NULL; 2822 rc2 = RTHandleClose(pTxsExec->StdErr.phChild); AssertRC(rc2); 2823 pTxsExec->StdErr.phChild = NULL; 2824 rc2 = RTPipeClose(pTxsExec->hTestPipeW); AssertRC(rc2); 2825 pTxsExec->hTestPipeW = NIL_RTPIPE; 2826 2827 /* 2828 * Let another worker function funnel output and input to the 2829 * client as well as the process exit code. 2830 */ 2831 rc = txsDoExecHlp2(pTxsExec); 2832 } 2833 else 2834 rc = txsReplyFailure(pPktHdr, "FAILED ", "Executing process \"%s\" failed with %Rrc", 2835 pszExecResolved, rc); 2836 2837 RTStrFree(pszExecResolved); 2828 2838 } 2829 2839 else 2830 rc = txsReplyFailure(pPktHdr, "FAILED ", "Executing process \"%s\" failed with %Rrc", 2831 pszExecName, rc); 2840 rc = VERR_NO_MEMORY; 2832 2841 } 2833 2842 else
Note:
See TracChangeset
for help on using the changeset viewer.