mirror of
https://github.com/kubernetes/sample-controller.git
synced 2025-01-31 17:02:52 +08: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. Kubernetes-commit: 03be789851db6e0606b2d58c220d0cb40f127168
This commit is contained in:
parent
7b42b3ac51
commit
7f56985485
@ -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
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user