[PD] [else/dir] leaks file handles (was: "too many open files" error in 0.48.1)

Roman Haefeli reduzent at gmail.com
Wed Jul 25 10:16:37 CEST 2018

On Tue, 2018-07-24 at 12:44 -0300, Alexandre Torres Porres wrote:
> Sorry, I thought I had fixed this in the last update. I swear it was
> working for me, but then... that reported bug came back :) The object
> still works fine for me in my use cases. Anyway, I'll give it another
> go in the next update.

My understanding is that calling opendir() opens a file descriptor that
is only closed after calling closedir() on that file descriptor. As far
as I can see, [dir] never calls closedir() and thus it accumulates open
file descriptors. So, I guess what you need to do is to close the
current file descriptor each time before processing 'reset' or 'open'
methods which I believe are the two methods that call opendir().

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: This is a digitally signed message part
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20180725/6b678457/attachment.sig>

More information about the Pd-list mailing list