[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:05:50 CEST 2018

Hey Alex

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 :) 

No need to be sorry. I'm not complaining, but simply reporting. 

> The object still works fine for me in my use cases. 

I figured it is still easy for me to work-around the problem (actually,
I don't need to open the same two directories again and again, I could
just use two instances of [dir] and open each of those directories
once). However, stuff like that surely is going to bite you back in the
future. It's certainly better to fix it anyway regardless of any
specific use case.

> Anyway, I'll give it another go in the next update. If I fail
> miserably I'll ask for help.

I don't know if it works the same on macOS, but on Linux I can check
what is going on with the lsof command, specifically 'lsof -c pd' which
lists all files openend by processes named pd. Each time I send 'open
/home/roman/Downloads' to [dir], I see two additional lines in lsof's

pd      9120 roman   23r   DIR    0,54    28672 29098010 /home/roman/Downloads
pd      9120 roman   24r   DIR    0,54    28672 29098010 /home/roman/Downloads

>  I just have other plans for the moment though...

Sure. Thanks for the library anyway.

-------------- 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/7a7a299e/attachment-0001.sig>

More information about the Pd-list mailing list