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

Function destroy_and_exit_process

server/main.c:257–272  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

255#define TASK_SWITCH_SLEEP 10000
256
257static void destroy_and_exit_process(process_rec *process,
258 int process_exit_value)
259{
260 /*
261 * Sleep for TASK_SWITCH_SLEEP micro seconds to cause a task switch on
262 * OS layer and thus give possibly started piped loggers a chance to
263 * process their input. Otherwise it is possible that they get killed
264 * by us before they can do so. In this case maybe valuable log messages
265 * might get lost.
266 */
267 apr_sleep(TASK_SWITCH_SLEEP);
268 ap_main_state = AP_SQ_MS_EXITING;
269 apr_pool_destroy(process->pool); /* and destroy all descendent pools */
270 apr_terminate();
271 exit(process_exit_value);
272}
273
274/* APR callback invoked if allocation fails. */
275static int abort_on_oom(int retcode)

Callers 2

usageFunction · 0.85
mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected