This PR refactors the stream error handling logic.
Since the close event waits for stdin/stdout/stderr to be closed, we do not need to await them.
Also, we were not listening for errors on stdin. We now are.
Also, this handles some specific error types which are piping-related better (will be better tested in the subprocess.pipe() PR, which is coming next).
Finally, this adds a few more tests.
This PR refactors the stream error handling logic.
Since the
close
event waits forstdin
/stdout
/stderr
to be closed, we do not need to await them. Also, we were not listening for errors onstdin
. We now are. Also, this handles some specific error types which are piping-related better (will be better tested in thesubprocess.pipe()
PR, which is coming next). Finally, this adds a few more tests.