Lines Matching defs:sc
32 static void simple_kill_random_child(simple_core_t * sc)
35 if (!sc->run_single_process) {
39 apr_thread_mutex_lock(sc->mtx);
40 hi = apr_hash_first(sc->pool, sc->children);
43 apr_hash_set(sc->children, &child->pid, sizeof(child->pid), NULL);
45 apr_thread_mutex_unlock(sc->mtx);
61 static int simple_spawn_child(simple_core_t * sc)
70 if (!sc->run_single_process) {
71 if (sc->spawn_via == SIMPLE_SPAWN_FORK) {
84 rv = simple_child_loop(sc);
103 apr_thread_mutex_lock(sc->mtx);
105 child = apr_palloc(sc->pool, sizeof(simple_child_t));
107 apr_hash_set(sc->children, &child->pid, sizeof(child->pid), child);
109 apr_thread_mutex_unlock(sc->mtx);
115 void simple_check_children_size(simple_core_t * sc, void *baton)
121 simple_register_timer(sc,
124 sc->pool);
126 if (sc->run_single_process && sc->restart_num == 2) {
132 simple_single_process_hack(sc);
138 apr_thread_mutex_lock(sc->mtx);
139 count = apr_hash_count(sc->children);
140 wanted = sc->procmgr.proc_count;
141 apr_thread_mutex_unlock(sc->mtx);
148 simple_kill_random_child(sc);
156 rv = simple_spawn_child(sc);