mirror of
https://github.com/rwinkhart/sys.git
synced 2026-09-06 09:07:16 -04:00
windows/svc/mgr: report exit status when querying services
One thing the newer notification API does not do is automatically provide the service exit code in its notifier response. It requires querying manually. Unfortunately, we weren't propagating this information up from the lower level struct, so this commit copys that information over. Change-Id: I70c683007ce34ffab6196329acefc8443f921ebe Reviewed-on: https://go-review.googlesource.com/c/sys/+/274577 Run-TryBot: Jason A. Donenfeld <Jason@zx2c4.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Alex Brainman <alex.brainman@gmail.com> Trust: Alex Brainman <alex.brainman@gmail.com> Trust: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
@@ -68,8 +68,10 @@ func (s *Service) Query() (svc.Status, error) {
|
||||
return svc.Status{}, err
|
||||
}
|
||||
return svc.Status{
|
||||
State: svc.State(t.CurrentState),
|
||||
Accepts: svc.Accepted(t.ControlsAccepted),
|
||||
ProcessId: t.ProcessId,
|
||||
State: svc.State(t.CurrentState),
|
||||
Accepts: svc.Accepted(t.ControlsAccepted),
|
||||
ProcessId: t.ProcessId,
|
||||
Win32ExitCode: t.Win32ExitCode,
|
||||
ServiceSpecificExitCode: t.ServiceSpecificExitCode,
|
||||
}, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user