You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original bug ID: 6183 Reporter: furuse Assigned to:@xclerc Status: closed (set by @xavierleroy on 2015-12-11T18:25:38Z) Resolution: fixed Priority: normal Severity: minor Version: 4.01.0 Fixed in version: 4.01.1+dev Category: standard library Tags: patch, junior_job Monitored by:@gasche@avsm
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.
Original bug ID: 6183
Reporter: furuse
Assigned to: @xclerc
Status: closed (set by @xavierleroy on 2015-12-11T18:25:38Z)
Resolution: fixed
Priority: normal
Severity: minor
Version: 4.01.0
Fixed in version: 4.01.1+dev
Category: standard library
Tags: patch, junior_job
Monitored by: @gasche @avsm
Bug 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.
File attachments
The text was updated successfully, but these errors were encountered: