Changeset 3200 in kBuild for trunk/src/kmk
- Timestamp:
- Mar 28, 2018 8:32:11 PM (7 years ago)
- Location:
- trunk/src/kmk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kmk/kmkbuiltin/kSubmit.c
r3199 r3200 71 71 72 72 #define TUPLE(a_sz) a_sz, sizeof(a_sz) - 1 73 73 74 74 75 /********************************************************************************************************************************* … … 1151 1152 # else 1152 1153 if (MkWinChildCreateSubmit((intptr_t)pWorker->OverlappedRead.hEvent, pWorker, 1153 pWorker->pStdOut, pWorker->pStdErr, p PidSpawned) == 0)1154 pWorker->pStdOut, pWorker->pStdErr, pChild, pPidSpawned) == 0) 1154 1155 { /* likely */ } 1155 1156 else … … 1691 1692 the kWorker process currently does not coordinate its output with 1692 1693 the output.c mechanics. */ 1694 #ifdef CONFIG_NEW_WIN_CHILDREN 1695 if (pCtx->pOut && !pWorker->pStdOut) 1696 #else 1693 1697 if (pCtx->pOut) 1698 #endif 1694 1699 output_dump(pCtx->pOut); 1695 1696 1700 rcExit = kSubmitSendJobMessage(pCtx, pWorker, pvMsg, cbMsg, 0 /*fNoRespawning*/, cVerbosity); 1697 1701 if (rcExit == 0) -
trunk/src/kmk/output.c
r3195 r3200 131 131 const char *nl = (const char *)memchr (src, '\n', len); 132 132 size_t line_len = nl ? nl - (const char *)src + 1 : len; 133 char *tmp = (char *)xmalloc ( 2 + line_len+ 1);134 tmp[0] = ' >';135 tmp[1] = ' ';136 memcpy (&tmp[2], src, line_len);133 char *tmp = (char *)xmalloc (1 + line_len + 1 + 1); 134 tmp[0] = '{'; 135 memcpy (&tmp[1], src, line_len); 136 tmp[1 + line_len] = '}'; 137 137 # ifdef KBUILD_OS_WINDOWS 138 maybe_con_fwrite (tmp, 2 + line_len, 1, dst);138 maybe_con_fwrite (tmp, 1 + line_len + 1, 1, dst); 139 139 # else 140 fwrite (tmp, 2 + line_len, 1, dst);140 fwrite (tmp, 1 + line_len + 1, 1, dst); 141 141 # endif 142 142 free (tmp); -
trunk/src/kmk/w32/winchildren.c
r3199 r3200 3118 3118 * @param hEvent The event object handle to wait on. 3119 3119 * @param pvSubmitWorker The argument to pass back to kSubmit to clean up. 3120 * @param pPid Where to return the pid.3121 3120 * @param pStdOut Standard output pipe for the worker. Optional. 3122 3121 * @param pStdErr Standard error pipe for the worker. Optional. 3123 */ 3124 int MkWinChildCreateSubmit(intptr_t hEvent, void *pvSubmitWorker, PWINCCWPIPE pStdOut, PWINCCWPIPE pStdErr, pid_t *pPid) 3122 * @param pMkChild The make child structure. 3123 * @param pPid Where to return the pid. 3124 */ 3125 int MkWinChildCreateSubmit(intptr_t hEvent, void *pvSubmitWorker, PWINCCWPIPE pStdOut, PWINCCWPIPE pStdErr, 3126 struct child *pMkChild, pid_t *pPid) 3125 3127 { 3126 3128 PWINCHILD pChild = mkWinChildNew(WINCHILDTYPE_SUBMIT); 3129 pChild->pMkChild = pMkChild; 3127 3130 pChild->u.Submit.hEvent = (HANDLE)hEvent; 3128 3131 pChild->u.Submit.pvSubmitWorker = pvSubmitWorker; -
trunk/src/kmk/w32/winchildren.h
r3199 r3200 75 75 struct child *pMkChild, pid_t *pPid); 76 76 77 int MkWinChildCreateSubmit(intptr_t hEvent, void *pvSubmitWorker, PWINCCWPIPE pStdOut, PWINCCWPIPE pStdErr, pid_t *pPid); 77 int MkWinChildCreateSubmit(intptr_t hEvent, void *pvSubmitWorker, PWINCCWPIPE pStdOut, PWINCCWPIPE pStdErr, 78 struct child *pMkChild, pid_t *pPid); 78 79 PWINCCWPIPE MkWinChildcareCreateWorkerPipe(unsigned iWhich, unsigned int idxWorker); 79 80 void MkWinChildcareWorkerDrainPipes(struct WINCHILD *pChild, PWINCCWPIPE pStdOut, PWINCCWPIPE pStdErr);
Note:
See TracChangeset
for help on using the changeset viewer.