Cotal TypeScript packages
    Preparing search index...

    Function ownStdoutErrors

    • Handle process.stdout's errors, EPIPE or any other, with onError until the returned release runs, for a command that must finish its own shutdown when its output fails. The binary's stdoutError stands down for that time, and outputFailed reports the error first. A result written after the loss sets its own exit status, 0 for an ok one, so the release puts exit 3 back. A failed write's error event comes a turn after its callback, and a queued write can still fail after the release, so the release waits for the writes made so far to settle and one more turn before it gives the errors back.

      Parameters

      • onError: (error: Error) => void

      Returns () => void