MCPcopy Create free account
hub / github.com/apache/httpd / wd_startup

Function wd_startup

modules/core/mod_watchdog.c:268–289  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

266}
267
268static apr_status_t wd_startup(ap_watchdog_t *w, apr_pool_t *p)
269{
270 apr_status_t rc;
271
272 apr_atomic_set32(&w->thread_started, 0);
273
274 if (w->singleton) {
275 /* Initialize singleton mutex in child */
276 rc = apr_proc_mutex_child_init(&w->mutex,
277 apr_proc_mutex_lockfile(w->mutex), p);
278 if (rc != APR_SUCCESS)
279 return rc;
280 }
281
282 /* Start the newly created watchdog */
283 rc = ap_thread_create(&w->thread, NULL, wd_worker, w, p);
284 if (rc == APR_SUCCESS) {
285 apr_pool_pre_cleanup_register(p, w, wd_worker_cleanup);
286 }
287
288 return rc;
289}
290
291static apr_status_t ap_watchdog_get_instance(ap_watchdog_t **watchdog,
292 const char *name,

Callers 2

wd_post_config_hookFunction · 0.85
wd_child_init_hookFunction · 0.85

Calls 1

ap_thread_createFunction · 0.85

Tested by

no test coverage detected