simple_children.c revision 52a5101047d0148d33df1f9f4f77b24bce7fdf70
/* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "httpd.h"
#include "http_config.h"
#include "simple_types.h"
#include "simple_event.h"
#include "simple_run.h"
#include "simple_children.h"
#include "apr_hash.h"
{
/* See comment in simple_spawn_child for why we check here. */
if (!sc->run_single_process) {
}
}
{
/* Although we could cut this off 'earlier', and not even invoke this
* function, I would like to keep the functions invoked when in debug mode
* to be as close as possible to those when not in debug... So, we just skip
* the actual spawn itself, but go through all of the motions...
*/
if (!sc->run_single_process) {
}
}
{
unsigned int count;
int wanted;
int i;
static int run = 0;
/* This is kinda of hack, but rather than spawning a child process,
* we register the normal IO handlers in the main event loop....
*/
if (run == 0) {
run++;
}
}
{
}
/* kill some kids */
for (i = 0; i < to_kill; i++) {
}
}
/* spawn some kids */
for (i = 0; i < to_spawn; i++) {
}
}
else {
/* juuuuust right. */
}
}