Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(terraform): prevent deadlock by consuming stdout (#6037)
Nodejs spawn will cease to emit error or close events when stdout hasn't been consumed. See also from official docs: > By default, pipes for stdin, stdout, and stderr are established between the parent Node.js process and the spawned subprocess. These pipes have limited (and platform-specific) capacity. If the subprocess writes to stdout in excess of that limit without the output being captured, the subprocess blocks waiting for the pipe buffer to accept more data. This is identical to the behavior of pipes in the shell. Use the { stdio: 'ignore' } option if the output will not be consumed. Source: https://nodejs.org/api/child_process.html#optionsstdio We used to consume the stdout, but in the ESM PR (0f535dd) we accidentally removed the pipe to logStream which can cause deadlocks for terraform users.
- Loading branch information