ddns-updater
ddns-updater copied to clipboard
Feature request: run as windows service
When the application is installed and run as a Windows service without using nssm, it often hangs in the "Starting" state and never fully transitions to "Running." This happens because the application is not designed to properly interact with the Windows Service Control Manager (SCM) interface.
Specifically:
Windows services must respond to SCM control requests (like Start, Stop, Pause) and report their status changes promptly. A service application needs to call StartServiceCtrlDispatcher and implement a service main function that communicates with the SCM. If the application is a regular console or GUI program that does not implement the Windows service protocol, SCM will wait indefinitely for a successful start notification. Without this handshake, SCM assumes the service is stuck, leaving it in the "Starting" state. nssm works around this by acting as a service wrapper: it runs the console application as a child process and handles SCM communication itself, preventing the service from hanging.