Merge pull request #116916 from mhuxtable/mhuxtable/update-signals-documentation

Fix sample-controller docs after moving to context-based cancellation
This commit is contained in:
Kubernetes Prow Robot 2023-04-11 19:16:58 -07:00 committed by GitHub
commit ab4ce0e9b8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -24,9 +24,9 @@ import (
var onlyOneSignalHandler = make(chan struct{}) var onlyOneSignalHandler = make(chan struct{})
// SetupSignalHandler registered for SIGTERM and SIGINT. A stop channel is returned // SetupSignalHandler registered for SIGTERM and SIGINT. A context is returned
// which is closed on one of these signals. If a second signal is caught, the program // which is cancelled on one of these signals. If a second signal is caught,
// is terminated with exit code 1. // the program is terminated with exit code 1.
func SetupSignalHandler() context.Context { func SetupSignalHandler() context.Context {
close(onlyOneSignalHandler) // panics when called twice close(onlyOneSignalHandler) // panics when called twice