Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support running under NSSM #6

Open
judwhite opened this issue Feb 25, 2017 · 1 comment
Open

Support running under NSSM #6

judwhite opened this issue Feb 25, 2017 · 1 comment
Labels

Comments

@judwhite
Copy link
Owner

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)

@judwhite
Copy link
Owner Author

judwhite commented Feb 1, 2021

This may be resolved by 8134bf0, needs investigation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant