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

Function ap_thread_main_create

server/util.c:3281–3301  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3279}
3280
3281AP_DECLARE(apr_status_t) ap_thread_main_create(apr_thread_t **thread,
3282 apr_pool_t *pool)
3283{
3284 apr_status_t rv;
3285 apr_threadattr_t *attr = NULL;
3286
3287 /* Create an apr_thread_t for the main child thread to set up its Thread
3288 * Local Storage. Since it's detached and won't apr_thread_exit(), destroy
3289 * its pool before exiting via a cleanup of the given pool.
3290 */
3291 if ((rv = apr_threadattr_create(&attr, pool))
3292 || (rv = apr_threadattr_detach_set(attr, 1))
3293 || (rv = ap_thread_current_create(thread, attr, pool))) {
3294 *thread = NULL;
3295 return rv;
3296 }
3297
3298 apr_pool_cleanup_register(pool, *thread, main_thread_cleanup,
3299 apr_pool_cleanup_null);
3300 return APR_SUCCESS;
3301}
3302
3303#endif /* APR_HAS_THREADS */
3304

Callers 5

init_processFunction · 0.85
child_mainFunction · 0.85
child_mainFunction · 0.85
child_mainFunction · 0.85
httpd.hFile · 0.85

Calls 1

ap_thread_current_createFunction · 0.85

Tested by

no test coverage detected