mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-12 21:36:24 +00:00
Fix sample-controller docs after moving to context-based cancellation
Since the stop channels were replaced in e346475
, the commentary is
incorrect and confusing.
This commit is contained in:
parent
0f373abb6a
commit
03be789851
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user