This improves the .pipe() logic. That logic relies on recursion (each .pipe() calls a new nanoSpawn() ). This PR simplifies how that recursion works.
This removes 15 lines, worth ~350 bytes.
It also improves the error handling logic, to ensure that if any subprocess fails, the stdin of all subprocesses is ended. This prevents any hanging processes.
Follow-up on #51.
This improves the
.pipe()
logic. That logic relies on recursion (each.pipe()
calls a newnanoSpawn()
). This PR simplifies how that recursion works.This removes 15 lines, worth ~350 bytes.
It also improves the error handling logic, to ensure that if any subprocess fails, the
stdin
of all subprocesses is ended. This prevents any hanging processes.