2
I'm running on windows 8.
Occasionally, when I resume from sleep, my service gets a stop request through the SCM (call to SvcCtrlHandler
with SERVICE_CONTROL_STOP
). I wasn't able to trace the source of this request. Can it possibly be sent by the OS itself, in some scenario?
My two main suspicions right now:
- If the resume event (
SERVICE_CONTROL_POWEREVENT
of typePBT_APMRESUMEAUTOMATIC
) is taking too long, the OS might stop the service (system logs contain logs referring to this specific service:A timeout was reached (30000 milliseconds) while waiting for the [...] The service did not respond to the start or control request in a timely fashion
) - The OS stops the service because it has been flagged as a problematic service (system logs contain logs referring to this specific service:
service did not shut down properly after receiving a preshutdown control