Before this patch, an attempt to read from a program that closed its stdout would result in a never-resolving read promise on Windows. Before this patch, an attempt to write to a program that closed its stdin would result in a never-resolving write promise on Windows. This patch fixes both issues by fixing the typo that prevented the implementation from detecting errors, and adds test coverage. Original Revision: https://phabricator.services.mozilla.com/D261332 Differential Revision: https://phabricator.services.mozilla.com/D267841