Allow waiting for debugger.
authorIain Patterson <me@iain.cx>
Mon, 25 Jul 2016 13:47:32 +0000 (14:47 +0100)
committerIain Patterson <me@iain.cx>
Thu, 28 Jul 2016 15:44:37 +0000 (16:44 +0100)
commitadda6b2aaf2a5631d0dfa0371f8f93855176a9c8
treee6e38ccece2617278de3f82a1a2b6fa75122d9ad
parent94d25a5dcfad872c97e71b646429fc87dc66acc2
Allow waiting for debugger.

If the service is started with the single argument "debug" eg by setting
the Start parameters of the service in services.msc, we delayed startup
in service_main() until the await_debugger variable is set to false.

Attach to nssm.exe with your debugger of choice, set a breakpoint within
that function and poke the variable when ready.

Beware that the behaviour of the service manager when service_main
doesn't complete operation promptly is undefined.
service.cpp