mirror of
https://github.com/prometheus/prometheus.git
synced 2025-01-30 07:03:06 -08:00
Merge pull request #4865 from squat/buffersignals
cmd/prometheus: buffer signal chans
This commit is contained in:
commit
b82f930238
|
@ -395,7 +395,7 @@ func main() {
|
|||
var g group.Group
|
||||
{
|
||||
// Termination handler.
|
||||
term := make(chan os.Signal)
|
||||
term := make(chan os.Signal, 1)
|
||||
signal.Notify(term, os.Interrupt, syscall.SIGTERM)
|
||||
cancel := make(chan struct{})
|
||||
g.Add(
|
||||
|
@ -474,7 +474,7 @@ func main() {
|
|||
|
||||
// Make sure that sighup handler is registered with a redirect to the channel before the potentially
|
||||
// long and synchronous tsdb init.
|
||||
hup := make(chan os.Signal)
|
||||
hup := make(chan os.Signal, 1)
|
||||
signal.Notify(hup, syscall.SIGHUP)
|
||||
cancel := make(chan struct{})
|
||||
g.Add(
|
||||
|
|
Loading…
Reference in a new issue