Skip to content

Commit 1f7d4f3

Browse files
committed
listen for SIGTERM in addition to SIGINT when shutting down the supervisor
1 parent 0e7df5c commit 1f7d4f3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cmd/opampsupervisor/main.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import (
99
"log"
1010
"os"
1111
"os/signal"
12+
"syscall"
1213

1314
"github.com/open-telemetry/opentelemetry-collector-contrib/cmd/opampsupervisor/supervisor"
1415
"github.com/open-telemetry/opentelemetry-collector-contrib/cmd/opampsupervisor/supervisor/config"
@@ -46,7 +47,7 @@ func runInteractive() error {
4647
}
4748

4849
interrupt := make(chan os.Signal, 1)
49-
signal.Notify(interrupt, os.Interrupt)
50+
signal.Notify(interrupt, os.Interrupt, syscall.SIGTERM)
5051
<-interrupt
5152
supervisor.Shutdown()
5253

0 commit comments

Comments
 (0)