Skip to content

Treat poll hangups as input errors - #89

Closed
JeffreyBenjaminBrown wants to merge 1 commit into
monome:mainfrom
JeffreyBenjaminBrown:fix-poll-disconnect-spin
Closed

JeffreyBenjaminBrown wants to merge 1 commit into
monome:mainfrom
JeffreyBenjaminBrown:fix-poll-disconnect-spin

Conversation

@JeffreyBenjaminBrown

Copy link
Copy Markdown

Treat POLLHUP and POLLNVAL like POLLERR in the Linux poll helper so callers can tear down disconnected devices instead of continuing the event loop. (Together with a parallel PR I am submitting now to serialosc, it reduced CPU usage from around 45% to negligible on my system, which can be inspected here: https://github.com/JeffreyBenjaminBrown/nixos-experiments/tree/xfce/config.)

@tehn

tehn commented May 15, 2026

Copy link
Copy Markdown
Member

Hi Jeff, thanks for investigating this!

@JeffreyBenjaminBrown

Copy link
Copy Markdown
Author

I don't actually know if this patch is at all worthwhile. I vibe-coded it to solve a bug on my system, and then the bug returned. I should have confessed sooner.

Now I seem to have solved that bug entirely by (very slightly) modifying serialosc[1]. So I'll close this.

[1] monome/serialosc#88

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants