Create buffered signals channel
This commit is contained in:
parent
5ca210fa60
commit
95e0633b2f
2 changed files with 3 additions and 21 deletions
|
@ -6,9 +6,11 @@ import (
|
|||
stdlog "log"
|
||||
"net/http"
|
||||
"os"
|
||||
"os/signal"
|
||||
"path/filepath"
|
||||
"sort"
|
||||
"strings"
|
||||
"syscall"
|
||||
"time"
|
||||
|
||||
"github.com/coreos/go-systemd/daemon"
|
||||
|
@ -119,7 +121,7 @@ func runCmd(staticConfiguration *static.Configuration) error {
|
|||
return err
|
||||
}
|
||||
|
||||
ctx := cmd.ContextWithSignal(context.Background())
|
||||
ctx, _ := signal.NotifyContext(context.Background(), syscall.SIGINT, syscall.SIGTERM)
|
||||
|
||||
if staticConfiguration.Experimental != nil && staticConfiguration.Experimental.DevPlugin != nil {
|
||||
var cancel context.CancelFunc
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue