blob: 50c66ff4141009f22df0f6d5e90e7f803f616a19 [file] [log] [blame]
// Copyright 2019 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//go:build !windows
package main
import (
"context"
"os/signal"
"golang.org/x/sys/unix"
)
// notifySIGTERM returns a context which is canceled when SIGTERM is
// received.
func notifySIGTERM(ctx context.Context) (_ context.Context, stop context.CancelFunc) {
return signal.NotifyContext(ctx, unix.SIGTERM)
}