Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
child_process.spawn() has undocumented 200kb buffer limit #4236
The child_process.spawn() function will pause a script's execution if it writes more than 200kb of stdout that isn't captured. I discovered this when my spawned process would suspiciously pause after exactly a certain amount of output.
Adding a listener for stdout that does nothing fixed it and allowed the script to run:
This is not documented in the docs. Is this intentional (and hence should be documented) or a bug?
That depends on with what options you spawned the child process. With
It's possible the documentation could be clearer (pull requests welcome) but it's working as intended, it implements flow control the same way