Skip to content

Prevent signal panic on race during immediate shutdown - #2803

Merged
RebeccaMahany merged 3 commits into
kolide:mainfrom
RebeccaMahany:becca/signal-panic
Aug 25, 2026
Merged

Prevent signal panic on race during immediate shutdown#2803
RebeccaMahany merged 3 commits into
kolide:mainfrom
RebeccaMahany:becca/signal-panic

Conversation

@RebeccaMahany

Copy link
Copy Markdown
Contributor

Builds on #2787. I think there's a second panic condition if launcher starts up and then shuts down basically immediately, Interrupt can race with Execute and the channel can close before Execute calls signal.Notify(sigChannel, os.Interrupt, syscall.SIGTERM). So I moved signal.Notify(sigChannel, os.Interrupt, syscall.SIGTERM) into newSignalListener so it's guaranteed to run first. I also added a separate interrupt channel so that we don't have to close sigChannel either.

@RebeccaMahany RebeccaMahany added the bug-fixes Bug Fixes label Aug 25, 2026
@RebeccaMahany
RebeccaMahany marked this pull request as ready for review August 25, 2026 19:49
@RebeccaMahany
RebeccaMahany added this pull request to the merge queue Aug 25, 2026
Merged via the queue into kolide:main with commit d384958 Aug 25, 2026
86 of 88 checks passed
@RebeccaMahany
RebeccaMahany deleted the becca/signal-panic branch August 25, 2026 20:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug-fixes Bug Fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants