diff --git a/CHANGELOG.md b/CHANGELOG.md index b2d9330e62d3..6eb31c6a59dc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -90,6 +90,8 @@ Main (unreleased) - Fix issue where Agent crashes when a blackbox modules config file is specified for blackbox integration. (@marctc) +- Fix issue where the code from agent would not return to the Windows Service Manager (@jkroepke) + - Fix issue where getting the support bundle failed due to using an HTTP Client that was not able to access the agent in-memory address. (@spartan0x117) - Fix an issue that lead the `loki.source.docker` container to use excessive diff --git a/cmd/grafana-agent-service/service.go b/cmd/grafana-agent-service/service.go index cb654b5c8851..10060e19cc28 100644 --- a/cmd/grafana-agent-service/service.go +++ b/cmd/grafana-agent-service/service.go @@ -3,6 +3,7 @@ package main import ( "context" "io" + "os" "os/exec" "github.com/go-kit/log" @@ -75,6 +76,7 @@ func (svc *serviceManager) Run(ctx context.Context) { } else { level.Info(svc.log).Log("msg", "service exited", "exit_code", exitCode) } + os.Exit(exitCode) } func (svc *serviceManager) buildCommand(ctx context.Context) *exec.Cmd {