> and by closing the socket instead of reading from it, ensures they are leaked.
It does:
create socketpair N+1
send socketpair N over socketpair N+1
close socketpair N
repeat
So the only ones that are ever closed are the local copy of something that was sent over another socketpair. So all of the fd's are reachable, assuming that an in-flight fd is (like a received fd) a copy of the original fd rather than a reference to it.
Seems like in-flight fds should still count against the sending process's open file limit. (So that all fds are counted against some processes open file limit).
It does:
So the only ones that are ever closed are the local copy of something that was sent over another socketpair. So all of the fd's are reachable, assuming that an in-flight fd is (like a received fd) a copy of the original fd rather than a reference to it.