Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0006183OCamlOCaml standard librarypublic2013-09-17 09:132014-01-23 10:17
Reporterfuruse 
Assigned Toxclerc 
PrioritynormalSeverityminorReproducibilityalways
StatusresolvedResolutionfixed 
PlatformOSOS Version
Product Version4.01.0 
Target VersionFixed in Version4.01.1+dev 
Summary0006183: Unix.shutdown_connection should be commented with more details
DescriptionAs 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.
Tagsjunior_job, patch
Attached Filestxt file icon pr-6183.txt [^] (782 bytes) 2013-09-18 20:36 [Show Content]

- Relationships

-  Notes
(0010375)
avsm (reporter)
2013-09-18 20:42

Doc patch added.
(0010835)
xclerc (developer)
2014-01-23 10:17

Patch applied in both trunk (revision 14419) and 4.01 (revision 14418) branches.

- Issue History
Date Modified Username Field Change
2013-09-17 09:13 furuse New Issue
2013-09-17 13:53 gasche Tag Attached: junior_job
2013-09-18 20:36 avsm File Added: pr-6183.txt
2013-09-18 20:42 avsm Note Added: 0010375
2014-01-21 16:02 doligez Tag Attached: patch
2014-01-23 10:17 xclerc Note Added: 0010835
2014-01-23 10:17 xclerc Status new => resolved
2014-01-23 10:17 xclerc Fixed in Version => 4.01.1+dev
2014-01-23 10:17 xclerc Resolution open => fixed
2014-01-23 10:17 xclerc Assigned To => xclerc


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker