Closed GrantM11235 closed 4 years ago
Thanks for your pull request. I also added a change that should avoid the fast-loop problem. Could you please try latest master? I currently don't have access to my Razer mice. Thanks a lot :)
Thanks for the quick response!
I reverted my fix to test out yours, it still runs at full speed after 1024 fds have been opened. It looks like you need to check accept
for errors rather than select
, strace shows the following lines repeated over and over:
select(1024, [9 10], NULL, NULL, NULL) = 2 (in [9 10])
accept(10, 0x7ffdead5ad40, [110]) = -1 EMFILE (Too many open files)
accept(9, 0x7ffdead5ad40, [110]) = -1 EMFILE (Too many open files)
Thanks for the feedback. I added a change 066d476fb32c06940bace967a63ac107f8ee8fd6 that checks for failure in all socket operations.
That works great, cpu usage stays at 0.0%
Thanks for testing.
Fixed in version 0.42.
I noticed that after razerd had been running for a while it would use a lot of cpu. I discovered that this is due to a combination of three bugs:
This pull request effectively solves the issue by fixing the second bug, but it would probably be a good idea to look at the other bugs as well.