Skip to content

Commit

Permalink
[Windows Service] Inherit exit code from agent (#4824)
Browse files Browse the repository at this point in the history
Signed-off-by: Jan-Otto Kröpke <[email protected]>
Co-authored-by: mattdurham <[email protected]>
  • Loading branch information
jkroepke and mattdurham authored Aug 22, 2023
1 parent 0cd4d26 commit b562344
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions cmd/grafana-agent-service/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package main
import (
"context"
"io"
"os"
"os/exec"

"github.com/go-kit/log"
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit b562344

Please sign in to comment.