MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / control_thread

Function control_thread

src/iscguard/cntl_guard.cpp:212–242  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

210
211
212static void WINAPI control_thread( DWORD action)
213{
214/**************************************
215 *
216 * c o n t r o l _ t h r e a d
217 *
218 **************************************
219 *
220 * Functional description
221 * Process a service control request.
222 *
223 **************************************/
224 const DWORD state = SERVICE_RUNNING;
225
226 switch (action)
227 {
228 case SERVICE_CONTROL_STOP:
229 case SERVICE_CONTROL_SHUTDOWN:
230 report_status(SERVICE_STOP_PENDING, NO_ERROR, 1, 3000);
231 SetEvent(stop_event_handle);
232 return;
233
234 case SERVICE_CONTROL_INTERROGATE:
235 break;
236
237 default:
238 break;
239 }
240
241 report_status(state, NO_ERROR, 0, 0);
242}
243
244
245static USHORT report_status(DWORD state, DWORD exit_code, DWORD checkpoint, DWORD hint)

Callers

nothing calls this directly

Calls 1

report_statusFunction · 0.70

Tested by

no test coverage detected