Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Unix.shutdown_connection should be commented with more details #6183
Original bug ID: 6183
As indicated in this blog post http://tategakibunko.hatenablog.com/entry/20130703/1372824611 , there are common misuses of Unix.shutdown_connection: in_channels are shutdown but never closed, and this results into FD leaks.
I quickly grepped my OPAM build directories and found two uses of Unix.shutdown_connection, one from lalbgtk and another from ocamlnet, which are such examples.
This should be because users read unix.mli and misunderstand that open_connection is a creator of channels and then shutdown_connection should be the final consumer.
One line of comment to tell that in_channel still need to be closed after Unix.shutdown_connection should help the situation.