VirtualBox

Changeset 3200 in kBuild for trunk/src/kmk


Ignore:
Timestamp:
Mar 28, 2018 8:32:11 PM (7 years ago)
Author:
bird
Message:

kmk,kWorker: Some fixes wrt output capture and ctrl-c.

Location:
trunk/src/kmk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kmk/kmkbuiltin/kSubmit.c

    r3199 r3200  
    7171
    7272#define TUPLE(a_sz)     a_sz, sizeof(a_sz) - 1
     73
    7374
    7475/*********************************************************************************************************************************
     
    11511152# else
    11521153        if (MkWinChildCreateSubmit((intptr_t)pWorker->OverlappedRead.hEvent, pWorker,
    1153                                    pWorker->pStdOut, pWorker->pStdErr, pPidSpawned) == 0)
     1154                                   pWorker->pStdOut, pWorker->pStdErr, pChild, pPidSpawned) == 0)
    11541155        { /* likely */ }
    11551156        else
     
    16911692               the kWorker process currently does not coordinate its output with
    16921693               the output.c mechanics. */
     1694#ifdef CONFIG_NEW_WIN_CHILDREN
     1695            if (pCtx->pOut && !pWorker->pStdOut)
     1696#else
    16931697            if (pCtx->pOut)
     1698#endif
    16941699                output_dump(pCtx->pOut);
    1695 
    16961700            rcExit = kSubmitSendJobMessage(pCtx, pWorker, pvMsg, cbMsg, 0 /*fNoRespawning*/, cVerbosity);
    16971701            if (rcExit == 0)
  • trunk/src/kmk/output.c

    r3195 r3200  
    131131              const char *nl = (const char *)memchr (src, '\n', len);
    132132              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] = '}';
    137137#  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);
    139139#  else
    140               fwrite (tmp, 2 + line_len, 1, dst);
     140              fwrite (tmp, 1 + line_len + 1, 1, dst);
    141141#  endif
    142142              free (tmp);
  • trunk/src/kmk/w32/winchildren.c

    r3199 r3200  
    31183118 * @param   hEvent          The event object handle to wait on.
    31193119 * @param   pvSubmitWorker  The argument to pass back to kSubmit to clean up.
    3120  * @param   pPid            Where to return the pid.
    31213120 * @param   pStdOut         Standard output pipe for the worker. Optional.
    31223121 * @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 */
     3125int MkWinChildCreateSubmit(intptr_t hEvent, void *pvSubmitWorker, PWINCCWPIPE pStdOut, PWINCCWPIPE pStdErr,
     3126                           struct child *pMkChild, pid_t *pPid)
    31253127{
    31263128    PWINCHILD pChild = mkWinChildNew(WINCHILDTYPE_SUBMIT);
     3129    pChild->pMkChild                = pMkChild;
    31273130    pChild->u.Submit.hEvent         = (HANDLE)hEvent;
    31283131    pChild->u.Submit.pvSubmitWorker = pvSubmitWorker;
  • trunk/src/kmk/w32/winchildren.h

    r3199 r3200  
    7575                               struct child *pMkChild, pid_t *pPid);
    7676
    77 int     MkWinChildCreateSubmit(intptr_t hEvent, void *pvSubmitWorker, PWINCCWPIPE pStdOut, PWINCCWPIPE pStdErr, pid_t *pPid);
     77int     MkWinChildCreateSubmit(intptr_t hEvent, void *pvSubmitWorker, PWINCCWPIPE pStdOut, PWINCCWPIPE pStdErr,
     78                               struct child *pMkChild, pid_t *pPid);
    7879PWINCCWPIPE MkWinChildcareCreateWorkerPipe(unsigned iWhich, unsigned int idxWorker);
    7980void    MkWinChildcareWorkerDrainPipes(struct WINCHILD *pChild, PWINCCWPIPE pStdOut, PWINCCWPIPE pStdErr);
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette