|
|
@ -253,8 +253,10 @@ func runInstall(args []string, client *action.Install, valueOpts *values.Options
|
|
|
|
ctx := context.Background()
|
|
|
|
ctx := context.Background()
|
|
|
|
ctx, cancel := context.WithCancel(ctx)
|
|
|
|
ctx, cancel := context.WithCancel(ctx)
|
|
|
|
|
|
|
|
|
|
|
|
// Handle SIGTERM
|
|
|
|
// Set up channel on which to send signal notifications.
|
|
|
|
cSignal := make(chan os.Signal)
|
|
|
|
// We must use a buffered channel or risk missing the signal
|
|
|
|
|
|
|
|
// if we're not ready to receive when the signal is sent.
|
|
|
|
|
|
|
|
cSignal := make(chan os.Signal, 2)
|
|
|
|
signal.Notify(cSignal, os.Interrupt, syscall.SIGTERM)
|
|
|
|
signal.Notify(cSignal, os.Interrupt, syscall.SIGTERM)
|
|
|
|
go func() {
|
|
|
|
go func() {
|
|
|
|
<-cSignal
|
|
|
|
<-cSignal
|
|
|
|