I’m having an odd issue where
Child processes are not being closed after their scope has exited, and I’m at a loss as to how to force them to close. It would seem that I cannot use the
wait method after I’m finished reading the Child’s piped stdout/stderr messages as that causes an issue with the borrow checker stating that I’ve already borrowed child.stderr/child.stdout previously.
Sample code attached, edited for stand-alone demonstration. The code in the example should simply execute the echo command 64,000 times and automatically close echo after echo has echoed what it was supposed to echo, but each echo process lingers around, gradually building up until an OS error 11 occurs. My question is why it’s not closing the child processes when
Child is dropped.