Wait for the child proc after closing the r2pipe to free resources. Without this fix the child process is not properly closed on a call to close().I experience this when spawing lot of pipes.
On some systems, calling wait or similar is necessary for the OS to release resources.
...
The standard library does not automatically wait on child processes (not even if the Child is dropped),
Detailed description
Wait for the child proc after closing the r2pipe to free resources. Without this fix the child process is not properly closed on a call to
close()
.I experience this when spawing lot of pipes.This seems to match the docs:
On some systems, calling wait or similar is necessary for the OS to release resources.
...The standard library does not automatically wait on child processes (not even if the Child is dropped),
...
Test plan
...
Closing issues
...