|View Issue Details [ Jump to Notes ] ||[ Issue History ] [ Print ] |
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0006183||OCaml||OCaml standard library||public||2013-09-17 09:13||2013-09-18 20:42|
|Assigned To|| |
|Product Version||4.01.0|| |
|Target Version||Fixed in Version|| |
|Summary||0006183: Unix.shutdown_connection should be commented with more details|
|Description||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.
|Attached Files|| pr-6183.txt [^] (782 bytes) 2013-09-18 20:36 [Show Content]