I have found a issue when using the gpio.waitForEdge() method from the GPIO class. It gives me a Too many files error after the configured linux open files limit when using the method in a loop. I used lsof and detected a lot of anon_inodes. I thought this has to be a problem with epoll. It turned out that the close(epollfd) before close(fd) in waitForEdge() was missing.
I second the motion...
I ran across this issue independently and fixed with close(epollfd).
Came here to the issues tab to share my findings, but @engineeringleague beat me to it.
Hi
I have found a issue when using the gpio.waitForEdge() method from the GPIO class. It gives me a Too many files error after the configured linux open files limit when using the method in a loop. I used lsof and detected a lot of anon_inodes. I thought this has to be a problem with epoll. It turned out that the close(epollfd) before close(fd) in waitForEdge() was missing.
Best regards Tom