Remove child process pipe from open pipes when the stream is closed