Skip to content

Unregister fds in kill#245

Open
dforsyth wants to merge 1 commit into
Smithay:masterfrom
dforsyth:master
Open

Unregister fds in kill#245
dforsyth wants to merge 1 commit into
Smithay:masterfrom
dforsyth:master

Conversation

@dforsyth

@dforsyth dforsyth commented Jun 29, 2026

Copy link
Copy Markdown

On FreeBSD, if we don't call unregister, a stale source is left behind in polling's kqueue implementation.

It becomes impossible to reuse that fd number, resulting in a crash for niri because of an AlreadyExists error (niri-wm/niri#4016).

This change tracks dispatcher registration in register and reregister, and subsequently does unregister (if necessary) when kill is called.

I've only tested this on FreeBSD with niri.

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.

1 participant