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

kmk,kWorker: Catch output from kWorker processes when --output-sync isn't 'none'.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kmk/w32/winchildren.h

    r3195 r3199  
    2727#define INCLUDED_WINCHILDREN_H
    2828
     29#ifdef DECLARE_HANDLE
     30/**
     31 * A childcare worker pipe.
     32 */
     33typedef struct WINCCWPIPE
     34{
     35    /** My end of the pipe. */
     36    HANDLE              hPipeMine;
     37    /** The child end of the pipe. */
     38    HANDLE              hPipeChild;
     39    /** The event for asynchronous reading. */
     40    HANDLE              hEvent;
     41    /** Which pipe this is (1 == stdout, 2 == stderr). */
     42    unsigned char       iWhich;
     43    /** Set if we've got a read pending already. */
     44    BOOL                fReadPending;
     45    /** Indicator that we've written out something.  This is cleared before
     46     * we start catching output from a new child and use in the CL.exe
     47     * supression heuristics. */
     48    BOOL                fHaveWrittenOut;
     49    /** Number of bytes at the start of the buffer that we've already
     50     * written out.  We try write out whole lines. */
     51    DWORD               cbWritten;
     52    /** The buffer offset of the read currently pending. */
     53    DWORD               offPendingRead;
     54    /** Read buffer size. */
     55    DWORD               cbBuffer;
     56    /** The read buffer allocation. */
     57    unsigned char      *pbBuffer;
     58    /** Overlapped I/O structure. */
     59    OVERLAPPED          Overlapped;
     60} WINCCWPIPE;
     61#endif
     62
     63typedef struct WINCCWPIPE *PWINCCWPIPE;
    2964
    3065void    MkWinChildInit(unsigned int cJobSlot);
     
    3974int     MkWinChildCreateAppend(const char *pszFilename, char **ppszAppend, size_t cbAppend, int fTruncate,
    4075                               struct child *pMkChild, pid_t *pPid);
    41 int     MkWinChildCreateSubmit(intptr_t hEvent, void *pvSubmitWorker, pid_t *pPid);
     76
     77int     MkWinChildCreateSubmit(intptr_t hEvent, void *pvSubmitWorker, PWINCCWPIPE pStdOut, PWINCCWPIPE pStdErr, pid_t *pPid);
     78PWINCCWPIPE MkWinChildcareCreateWorkerPipe(unsigned iWhich, unsigned int idxWorker);
     79void    MkWinChildcareWorkerDrainPipes(struct WINCHILD *pChild, PWINCCWPIPE pStdOut, PWINCCWPIPE pStdErr);
     80void    MkWinChildcareDeleteWorkerPipe(PWINCCWPIPE pPipe);
     81
    4282int     MkWinChildCreateRedirect(intptr_t hProcess, pid_t *pPid);
    4383# ifdef DECLARE_HANDLE
     
    5595int     MkWinChildUnrelatedCloseOnExec(int fd);
    5696
     97
    5798#endif
    5899
Note: See TracChangeset for help on using the changeset viewer.