X Tutup
Skip to content

fix(agent/reaper): prevent SIGINT from killing test process#22870

Draft
mafredri wants to merge 1 commit intomainfrom
fix-reap-interrupt-sigint
Draft

fix(agent/reaper): prevent SIGINT from killing test process#22870
mafredri wants to merge 1 commit intomainfrom
fix-reap-interrupt-sigint

Conversation

@mafredri
Copy link
Member

@mafredri mafredri commented Mar 9, 2026

The TestReapInterrupt test sends SIGINT to its own process. Under the race detector, the catchSignals goroutine inside ForkReap may not have registered signal.Notify yet, so Go's default SIGINT handler can terminate the test binary with signal: interrupt.

Fix: register signal.Notify for os.Interrupt in the test before sending SIGINT. This disables the default termination behavior while still allowing the catchSignals handler to receive the signal independently.

The TestReapInterrupt test sends SIGINT to its own process. Under
the race detector, the catchSignals goroutine inside ForkReap may
not have registered signal.Notify yet, so Go's default SIGINT
handler can terminate the test binary.

Register signal.Notify for os.Interrupt in the test before sending
SIGINT. This disables the default termination behavior while still
allowing the catchSignals handler to receive the signal
independently.
@mafredri mafredri marked this pull request as draft March 9, 2026 23:07
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

X Tutup