diff options
-rw-r--r-- | docs/service/TODOS | 2 | ||||
-rw-r--r-- | src/service/service.c | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/docs/service/TODOS b/docs/service/TODOS index d0dac53..a67992a 100644 --- a/docs/service/TODOS +++ b/docs/service/TODOS @@ -1,6 +1,6 @@ - option parsing on windows? - have a generic message/po-file extractor, the perl script here is an evil copy! -- handle poweroff and pause continue +- handle pause/continue - test long-duration startup and shutdown phases with checkpoint_hints diff --git a/src/service/service.c b/src/service/service.c index d697b82..e21423c 100644 --- a/src/service/service.c +++ b/src/service/service.c @@ -214,7 +214,7 @@ static void wolf_service_report_status( DWORD current_state, service_status.dwWin32ExitCode = exit_code; service_status.dwServiceSpecificExitCode = 0; service_status.dwWaitHint = wait_hint; - service_status.dwControlsAccepted = SERVICE_ACCEPT_STOP; + service_status.dwControlsAccepted = SERVICE_ACCEPT_STOP | SERVICE_ACCEPT_SHUTDOWN; switch( current_state ) { case SERVICE_START_PENDING: @@ -263,6 +263,7 @@ void WINAPI wolf_service_ctrl_handler( DWORD control ) { switch( control ) { case SERVICE_CONTROL_STOP: + case SERVICE_CONTROL_SHUTDOWN: wolf_service_report_status( SERVICE_STOP_PENDING, NO_ERROR, 1000 ); SetEvent( service_stop_event ); break; |