[Haskell-cafe] Preventing leaked open file descriptors when catching exceptions

Bryan O'Sullivan bos at serpentine.com
Tue Feb 21 18:44:14 CET 2012


On Tue, Feb 21, 2012 at 8:16 AM, Ryan Newton <rrnewton at gmail.com> wrote:

> FYI, lsof confirms that there are indeed many many open connections to the
> same FIFO:
>

Like all of the lowest-level I/O functions, openFD just gives you back an
integer, and the Fd type has no notion that there's an underlying system
resource associated with it. It's your responsibility to manage it (i.e.
clean up manually when catching an exception).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20120221/564d621b/attachment.htm>


More information about the Haskell-Cafe mailing list