Skip to content

x/sys/windows/svc/mgr: add Service.RecoveryActionsOnNonCrashFailures and Service.SetRecoveryActionsOnNonCrashFailures #59016

Closed
@craig65535

Description

@craig65535

Proposal is at #59016 (comment)


What version of Go are you using (go version)?

$ go version
1.19.5

Does this issue reproduce with the latest release?

Yes

What operating system and processor architecture are you using (go env)?

windows/amd64

What did you do?

Created a Windows service that requires recovery actions (such as restarting) that are executed when the service has exited with an error but has not crashed.

With a *mgr.Service (s), I attempted s.SetRecoveryActions and found that it did not support setting this flag.

What did you expect to see?

s.SetRecoveryActions should include the failure actions flag.

This is supported by ChangeServiceConfig2 but not the wrapper that exists in Service.SetRecoveryActions.

What did you see instead?

s.SetRecoveryActions can only set the recovery actions themselves, and the time at which each is active.

Proposal details

See #59016 (comment) where we propose adding API to access RecoveryActionsOnNonCrashFailures flag.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions