| 255 | #define TASK_SWITCH_SLEEP 10000 |
| 256 | |
| 257 | static 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. */ |
| 275 | static int abort_on_oom(int retcode) |