Skip to content

Support running under NSSM #6

@judwhite

Description

@judwhite

If the binary isn't running under Service Control Manager (SCM), then StartServiceCtrlDispatcher() will fail with ERROR_FAILED_SERVICE_CONTROLLER_CONNECT. This is a more reliable way of detecting if a service is running under SCM than checking svc.IsAnInteractiveSession. Checking the IsAnInteractiveSession value first can be an optimization to avoid skipping the StartServiceCtrlDispatcher error check.

In Go, svc.Run should fail here calling windows.StartServiceCtrlDispatcher.

Troubleshooting tips, if needed: http://stackoverflow.com/a/30719534 (from 2015-05-26)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions