From 03be789851db6e0606b2d58c220d0cb40f127168 Mon Sep 17 00:00:00 2001 From: Matthew Huxtable Date: Fri, 24 Mar 2023 15:39:19 +0000 Subject: [PATCH] Fix sample-controller docs after moving to context-based cancellation Since the stop channels were replaced in e346475, the commentary is incorrect and confusing. --- staging/src/k8s.io/sample-controller/pkg/signals/signal.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/staging/src/k8s.io/sample-controller/pkg/signals/signal.go b/staging/src/k8s.io/sample-controller/pkg/signals/signal.go index e0d5c1b925f..2a5b462a1b8 100644 --- a/staging/src/k8s.io/sample-controller/pkg/signals/signal.go +++ b/staging/src/k8s.io/sample-controller/pkg/signals/signal.go @@ -24,9 +24,9 @@ import ( var onlyOneSignalHandler = make(chan struct{}) -// SetupSignalHandler registered for SIGTERM and SIGINT. A stop channel is returned -// which is closed on one of these signals. If a second signal is caught, the program -// is terminated with exit code 1. +// SetupSignalHandler registered for SIGTERM and SIGINT. A context is returned +// which is cancelled on one of these signals. If a second signal is caught, +// the program is terminated with exit code 1. func SetupSignalHandler() context.Context { close(onlyOneSignalHandler) // panics when called twice