21227: Fix unbuffered channels used for signal.Notify.
[arvados.git] / lib / boot / supervisor.go
index 28be8f3a1409725fb8b14da8fc2c264c3d6d1606..e25fb8cdbad524b0d70b76a4aa9d130c3dbcfb18 100644 (file)
@@ -111,7 +111,7 @@ func (super *Supervisor) Start(ctx context.Context) {
        super.ctx, super.cancel = context.WithCancel(ctx)
        super.done = make(chan struct{})
 
-       sigch := make(chan os.Signal)
+       sigch := make(chan os.Signal, 1)
        signal.Notify(sigch, syscall.SIGINT, syscall.SIGTERM, syscall.SIGHUP)
        go func() {
                defer signal.Stop(sigch)