From 3e7e1f90e99c07b2e38eff3ea8c9bc67ab1e2b7c Mon Sep 17 00:00:00 2001 From: David Elie-Dit-Cosaque Date: Wed, 6 Dec 2023 08:51:24 -0600 Subject: [PATCH] Only capture ctrl-c while tests are running --- pkg/checksdb/checksdb.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/checksdb/checksdb.go b/pkg/checksdb/checksdb.go index 2d43aacd2..03987bf14 100644 --- a/pkg/checksdb/checksdb.go +++ b/pkg/checksdb/checksdb.go @@ -40,6 +40,8 @@ func RunChecks(labelsExpr string, timeout time.Duration) error { const SIGINTBufferLen = 10 sigIntChan := make(chan os.Signal, SIGINTBufferLen) signal.Notify(sigIntChan, syscall.SIGINT, syscall.SIGTERM) + // turn off ctrl-c capture on exit + defer signal.Stop(sigIntChan) // Labels expression parser not implemented yet. Assume labelsExpr is just a label. abort := false