return (0);
}
-static int make_worker(server_rec *s, int slot, time_t now)
+static int make_worker(server_rec *s, int slot)
{
thread_id tid;
proc_info *my_info = (proc_info *)malloc(sizeof(proc_info));
if (ap_child_table[i].pid) {
continue;
}
- if (make_worker(ap_server_conf, i, 0) < 0) {
+ if (make_worker(ap_server_conf, i) < 0) {
break;
}
--number_to_start;
static void perform_idle_server_maintenance(void)
{
int i;
- time_t now = 0;
int free_length;
int free_slots[MAX_SPAWN_RATE];
int last_non_dead;
if (free_length > 0) {
for (i = 0; i < free_length; ++i) {
- make_worker(ap_server_conf, free_slots[i], now);
+ make_worker(ap_server_conf, free_slots[i]);
}
/* the next time around we want to spawn twice as many if this
* wasn't good enough, but not if we've just done a graceful
/* we're still doing a 1-for-1 replacement of dead
* children with new children
*/
- make_worker(ap_server_conf, child_slot, time(NULL));
+ make_worker(ap_server_conf, child_slot);
--remaining_threads_to_start;
}
#if APR_HAS_OTHER_CHILD
}
}
-static int make_child(server_rec *s, int slot, time_t now)
+static int make_child(server_rec *s, int slot)
{
int pid;
if (ap_child_table[i].pid) {
continue;
}
- if (make_child(ap_server_conf, i, 0) < 0) {
+ if (make_child(ap_server_conf, i) < 0) {
break;
}
--number_to_start;
static void perform_child_maintenance(void)
{
int i;
- time_t now = 0;
int free_length;
int free_slots[MAX_SPAWN_RATE];
int last_non_dead = -1;
if (free_length > 0) {
for (i = 0; i < free_length; ++i) {
- make_child(ap_server_conf, free_slots[i], now);
+ make_child(ap_server_conf, free_slots[i]);
}
/* the next time around we want to spawn twice as many if this
* wasn't good enough, but not if we've just done a graceful
/* we're still doing a 1-for-1 replacement of dead
* children with new children
*/
- make_child(ap_server_conf, child_slot, time(NULL));
+ make_child(ap_server_conf, child_slot);
--remaining_children_to_start;
}
#if APR_HAS_OTHER_CHILD
}
}
-static int make_child(server_rec *s, int slot, time_t now)
+static int make_child(server_rec *s, int slot)
{
int pid;
if (ap_child_table[i].pid) {
continue;
}
- if (make_child(ap_server_conf, i, 0) < 0) {
+ if (make_child(ap_server_conf, i) < 0) {
break;
}
--number_to_start;
static void perform_child_maintenance(void)
{
int i;
- time_t now = 0;
int free_length;
int free_slots[MAX_SPAWN_RATE];
int last_non_dead = -1;
if (free_length > 0) {
for (i = 0; i < free_length; ++i) {
- make_child(ap_server_conf, free_slots[i], now);
+ make_child(ap_server_conf, free_slots[i]);
}
/* the next time around we want to spawn twice as many if this
* wasn't good enough, but not if we've just done a graceful
/* we're still doing a 1-for-1 replacement of dead
* children with new children
*/
- make_child(ap_server_conf, child_slot, time(NULL));
+ make_child(ap_server_conf, child_slot);
--remaining_children_to_start;
}
#if APR_HAS_OTHER_CHILD
return (0);
}
-static int make_child(server_rec *s, int slot, time_t now)
+static int make_child(server_rec *s, int slot)
{
thread_id tid;
if (ap_child_table[i].pid) {
continue;
}
- if (make_child(ap_server_conf, i, 0) < 0) {
+ if (make_child(ap_server_conf, i) < 0) {
break;
}
--number_to_start;
static void perform_idle_server_maintenance(void)
{
int i;
- time_t now = 0;
int free_length;
int free_slots[MAX_SPAWN_RATE];
int last_non_dead;
if (free_length > 0) {
for (i = 0; i < free_length; ++i) {
- make_child(ap_server_conf, free_slots[i], now);
+ make_child(ap_server_conf, free_slots[i]);
}
/* the next time around we want to spawn twice as many if this
* wasn't good enough, but not if we've just done a graceful
/* we're still doing a 1-for-1 replacement of dead
* children with new children
*/
- make_child(ap_server_conf, child_slot, time(NULL));
+ make_child(ap_server_conf, child_slot);
--remaining_children_to_start;
}
#if APR_HAS_OTHER_CHILD
}
}
-static int make_child(server_rec *s, int slot, time_t now)
+static int make_child(server_rec *s, int slot)
{
int pid;
if (ap_scoreboard_image->parent[i].pid != 0) {
continue;
}
- if (make_child(ap_server_conf, i, 0) < 0) {
+ if (make_child(ap_server_conf, i) < 0) {
break;
}
--number_to_start;
int i, j;
int idle_thread_count;
short_score *ss;
- time_t now = 0;
int free_length;
int free_slots[MAX_SPAWN_RATE];
int last_non_dead;
idle_thread_count, total_non_dead);
}
for (i = 0; i < free_length; ++i) {
- make_child(ap_server_conf, free_slots[i], now);
+ make_child(ap_server_conf, free_slots[i]);
}
/* the next time around we want to spawn twice as many if this
* wasn't good enough, but not if we've just done a graceful
/* we're still doing a 1-for-1 replacement of dead
* children with new children
*/
- make_child(ap_server_conf, child_slot, time(NULL));
+ make_child(ap_server_conf, child_slot);
--remaining_children_to_start;
}
#if APR_HAS_OTHER_CHILD
}
}
-static int make_child(server_rec *s, int slot, time_t now)
+static int make_child(server_rec *s, int slot)
{
int pid;
if (ap_child_table[i].pid) {
continue;
}
- if (make_child(ap_server_conf, i, 0) < 0) {
+ if (make_child(ap_server_conf, i) < 0) {
break;
}
--number_to_start;
static void perform_child_maintenance(void)
{
int i;
- time_t now = 0;
int free_length;
int free_slots[MAX_SPAWN_RATE];
int last_non_dead = -1;
if (free_length > 0) {
for (i = 0; i < free_length; ++i) {
- make_child(ap_server_conf, free_slots[i], now);
+ make_child(ap_server_conf, free_slots[i]);
}
/* the next time around we want to spawn twice as many if this
* wasn't good enough, but not if we've just done a graceful
/* we're still doing a 1-for-1 replacement of dead
* children with new children
*/
- make_child(ap_server_conf, child_slot, time(NULL));
+ make_child(ap_server_conf, child_slot);
--remaining_children_to_start;
}
#if APR_HAS_OTHER_CHILD
}
-static int make_child(server_rec *s, int slot, time_t now)
+static int make_child(server_rec *s, int slot)
{
TID tid;
static void startup_children(int number_to_start)
{
int i;
- time_t now = time(0);
for (i = 0; number_to_start && i < ap_daemons_limit; ++i) {
if (ap_scoreboard_image->servers[0][i].status != SERVER_DEAD) {
continue;
}
- if (make_child(ap_server_conf, i, now) < 0) {
+ if (make_child(ap_server_conf, i) < 0) {
break;
}
--number_to_start;
int to_kill;
int idle_count;
short_score *ss;
- time_t now = time(0);
int free_length;
int free_slots[MAX_SPAWN_RATE];
int last_non_dead;
idle_count, total_non_dead);
}
for (i = 0; i < free_length; ++i) {
- make_child(ap_server_conf, free_slots[i], now);
+ make_child(ap_server_conf, free_slots[i]);
}
/* the next time around we want to spawn twice as many if this
* wasn't good enough, but not if we've just done a graceful
/* we're still doing a 1-for-1 replacement of dead
* children with new children
*/
- make_child(ap_server_conf, thread_slot, time(0));
+ make_child(ap_server_conf, thread_slot);
--remaining_children_to_start;
}
#if APR_HAS_OTHER_CHILD