static HANDLE ThreadDispatchIOCP = NULL;
+server_rec *ap_server_conf;
+
/* Definitions of WINNT MPM specific config globals */
-static server_rec *server_conf;
static apr_pool_t *pconf;
static apr_pool_t *pchild = NULL;
static int workers_may_exit = 0;
/* Um, problem, can't signal the parent, which means we can't
* signal ourselves to die. Ignore for now...
*/
- ap_log_error(APLOG_MARK, APLOG_EMERG, apr_get_os_error(), server_conf,
+ ap_log_error(APLOG_MARK, APLOG_EMERG, apr_get_os_error(), ap_server_conf,
"OpenEvent on %s event", signal_name);
return;
}
if (SetEvent(e) == 0) {
/* Same problem as above */
- ap_log_error(APLOG_MARK, APLOG_EMERG, apr_get_os_error(), server_conf,
+ ap_log_error(APLOG_MARK, APLOG_EMERG, apr_get_os_error(), ap_server_conf,
"SetEvent on %s event", signal_name);
CloseHandle(e);
return;
for (lr = ap_listeners; lr; lr = lr->next) {
if (!ReadFile(pipe, &WSAProtocolInfo, sizeof(WSAPROTOCOL_INFO),
&BytesRead, (LPOVERLAPPED) NULL)) {
- ap_log_error(APLOG_MARK, APLOG_CRIT, apr_get_os_error(), server_conf,
+ ap_log_error(APLOG_MARK, APLOG_CRIT, apr_get_os_error(), ap_server_conf,
"setup_inherited_listeners: Unable to read socket data from parent");
ap_signal_parent(SIGNAL_PARENT_SHUTDOWN);
exit(1);
}
- ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_INFO, APR_SUCCESS, server_conf,
+ ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_INFO, APR_SUCCESS, ap_server_conf,
"Child %d: setup_inherited_listener() read = %d bytes of WSAProtocolInfo.", my_pid);
nsd = WSASocket(FROM_PROTOCOL_INFO, FROM_PROTOCOL_INFO, FROM_PROTOCOL_INFO,
&WSAProtocolInfo, 0, 0);
if (nsd == INVALID_SOCKET) {
- ap_log_error(APLOG_MARK, APLOG_CRIT, apr_get_netos_error(), server_conf,
+ ap_log_error(APLOG_MARK, APLOG_CRIT, apr_get_netos_error(), ap_server_conf,
"Child %d: setup_inherited_listeners(), WSASocket failed to open the inherited socket.", my_pid);
ap_signal_parent(SIGNAL_PARENT_SHUTDOWN);
exit(1);
* select errors. This count is used to ensure we don't go into
* a busy loop of continuous errors.
*/
- ap_log_error(APLOG_MARK, APLOG_INFO, apr_get_netos_error(), server_conf,
+ ap_log_error(APLOG_MARK, APLOG_INFO, apr_get_netos_error(), ap_server_conf,
"select failed with error %d", apr_get_netos_error());
count_select_errors++;
if (count_select_errors > MAX_SELECT_ERRORS) {
shutdown_in_progress = 1;
- ap_log_error(APLOG_MARK, APLOG_ERR, apr_get_netos_error(), server_conf,
+ ap_log_error(APLOG_MARK, APLOG_ERR, apr_get_netos_error(), ap_server_conf,
"Too many errors in select loop. Child process exiting.");
break;
}
if (csd < 0) {
if (APR_STATUS_IS_ECONNABORTED(apr_get_netos_error())) {
- ap_log_error(APLOG_MARK, APLOG_ERR, apr_get_netos_error(), server_conf,
+ ap_log_error(APLOG_MARK, APLOG_ERR, apr_get_netos_error(), ap_server_conf,
"accept: (client socket)");
}
}
/* allocate the completion context and the transaction pool */
context = apr_pcalloc(pconf, sizeof(COMP_CONTEXT));
if (!context) {
- ap_log_error(APLOG_MARK,APLOG_ERR, apr_get_os_error(), server_conf,
+ ap_log_error(APLOG_MARK,APLOG_ERR, apr_get_os_error(), ap_server_conf,
"win9x_get_connection: apr_pcalloc() failed. Process will exit.");
return NULL;
}
context->sa_server = apr_palloc(context->ptrans, len);
if (getsockname(context->accept_socket,
context->sa_server, &len)== SOCKET_ERROR) {
- ap_log_error(APLOG_MARK, APLOG_WARNING, apr_get_netos_error(), server_conf,
+ ap_log_error(APLOG_MARK, APLOG_WARNING, apr_get_netos_error(), ap_server_conf,
"getsockname failed");
continue;
}
context->sa_client = apr_palloc(context->ptrans, len);
if ((getpeername(context->accept_socket,
context->sa_client, &len)) == SOCKET_ERROR) {
- ap_log_error(APLOG_MARK, APLOG_WARNING, apr_get_netos_error(), server_conf,
+ ap_log_error(APLOG_MARK, APLOG_WARNING, apr_get_netos_error(), ap_server_conf,
"getpeername failed");
memset(&context->sa_client, '\0', sizeof(context->sa_client));
}
if (num_completion_contexts >= ap_threads_per_child) {
static int reported = 0;
if (!reported) {
- ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, server_conf,
+ ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, ap_server_conf,
"Server ran out of threads to serve requests. Consider "
"raising the ThreadsPerChild setting");
reported = 1;
pCompContext->Overlapped.hEvent = CreateEvent(NULL, TRUE, FALSE, NULL);
if (pCompContext->Overlapped.hEvent == NULL) {
- ap_log_error(APLOG_MARK,APLOG_ERR, apr_get_os_error(), server_conf,
+ ap_log_error(APLOG_MARK,APLOG_ERR, apr_get_os_error(), ap_server_conf,
"winnt_accept: CreateEvent failed. Process will exit.");
// return -1;
}
pCompContext->accept_socket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
if (pCompContext->accept_socket == INVALID_SOCKET) {
- ap_log_error(APLOG_MARK,APLOG_ERR, apr_get_netos_error(), server_conf,
+ ap_log_error(APLOG_MARK,APLOG_ERR, apr_get_netos_error(), ap_server_conf,
"winnt_accept: socket() failed. Process will exit.");
// return -1;
}
if (setsockopt(pCompContext->accept_socket, SOL_SOCKET,
SO_UPDATE_ACCEPT_CONTEXT, (char *)&nlsd,
sizeof(nlsd))) {
- ap_log_error(APLOG_MARK, APLOG_ERR, apr_get_netos_error(), server_conf,
+ ap_log_error(APLOG_MARK, APLOG_ERR, apr_get_netos_error(), ap_server_conf,
"setsockopt(SO_UPDATE_ACCEPT_CONTEXT) failed.");
/* Not a failure condition. Keep running. */
}
* Get a new socket and try the call again.
*/
pCompContext->accept_socket = INVALID_SOCKET;
- ap_log_error(APLOG_MARK, APLOG_DEBUG, lasterror, server_conf,
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, lasterror, ap_server_conf,
"winnt_accept: AcceptEx failed. Reallocate the accept socket and try again.");
if (shutdown_in_progress)
break;
goto again;
}
else if (lasterror != APR_FROM_OS_ERROR(ERROR_IO_PENDING)) {
- ap_log_error(APLOG_MARK,APLOG_ERR, lasterror, server_conf,
+ ap_log_error(APLOG_MARK,APLOG_ERR, lasterror, ap_server_conf,
"winnt_accept: AcceptEx failed. Process will exit.");
// return -1;
}
&pol, INFINITE);
if (!rc) {
rc = apr_get_os_error();
- ap_log_error(APLOG_MARK,APLOG_DEBUG, rc, server_conf,
+ ap_log_error(APLOG_MARK,APLOG_DEBUG, rc, ap_server_conf,
"Child %d: GetQueuedComplationStatus returned %d", my_pid, rc);
continue;
}
g_blocked_threads--;
if ((rc = apr_pool_create(&pCompContext->ptrans, pconf)) != APR_SUCCESS) {
- ap_log_error(APLOG_MARK,APLOG_DEBUG, rc, server_conf,
+ ap_log_error(APLOG_MARK,APLOG_DEBUG, rc, ap_server_conf,
"Child %d: apr_pool_create failed with rc %d", my_pid, rc);
}
/* ### is this correct? Shouldn't be inheritable (at this point) */
apr_os_sock_make(&context->sock, &sockinfo, context->ptrans);
- c = ap_new_connection(context->ptrans, server_conf, context->sock,
+ c = ap_new_connection(context->ptrans, ap_server_conf, context->sock,
thread_num);
if (c) {
ap_update_child_status(0, thread_num, SERVER_DEAD, (request_rec *) NULL);
- ap_log_error(APLOG_MARK, APLOG_INFO, APR_SUCCESS, server_conf,
+ ap_log_error(APLOG_MARK, APLOG_INFO, APR_SUCCESS, ap_server_conf,
"Child %d: Thread exiting.", my_pid);
}
/* Child process mode */
apr_lock_child_init(&start_mutex, signal_name_prefix, pconf);
exit_event = OpenEvent(EVENT_ALL_ACCESS, FALSE, exit_event_name);
- ap_log_error(APLOG_MARK, APLOG_INFO, APR_SUCCESS, server_conf,
+ ap_log_error(APLOG_MARK, APLOG_INFO, APR_SUCCESS, ap_server_conf,
"Child %d: exit_event_name = %s", my_pid, exit_event_name);
}
ap_assert(max_requests_per_child_event);
apr_pool_create(&pchild, pconf);
+
+ ap_run_child_init(pchild, ap_server_conf);
+
allowed_globals.jobsemaphore = CreateSemaphore(NULL, 0, 1000000, NULL);
apr_lock_create(&allowed_globals.jobmutex, APR_MUTEX, APR_INTRAPROCESS, NULL, pchild);
*/
status = apr_lock_acquire(start_mutex);
if (status != APR_SUCCESS) {
- ap_log_error(APLOG_MARK,APLOG_ERR, status, server_conf,
+ ap_log_error(APLOG_MARK,APLOG_ERR, status, ap_server_conf,
"Child %d: Failed to acquire the start_mutex. Process will exit.", my_pid);
ap_signal_parent(SIGNAL_PARENT_SHUTDOWN);
exit(0);
}
- ap_log_error(APLOG_MARK,APLOG_INFO, APR_SUCCESS, server_conf,
+ ap_log_error(APLOG_MARK,APLOG_INFO, APR_SUCCESS, ap_server_conf,
"Child %d: Acquired the start mutex.", my_pid);
/*
/*
* Create the pool of worker threads
*/
- ap_log_error(APLOG_MARK,APLOG_INFO, APR_SUCCESS, server_conf,
+ ap_log_error(APLOG_MARK,APLOG_INFO, APR_SUCCESS, ap_server_conf,
"Child %d: Starting %d worker threads.", my_pid, nthreads);
child_handles = (thread) alloca(nthreads * sizeof(int));
for (i = 0; i < nthreads; i++) {
cld = rv - WAIT_OBJECT_0;
if (rv == WAIT_FAILED) {
/* Something serious is wrong */
- ap_log_error(APLOG_MARK, APLOG_CRIT, apr_get_os_error(), server_conf,
+ ap_log_error(APLOG_MARK, APLOG_CRIT, apr_get_os_error(), ap_server_conf,
"Child %d: WAIT_FAILED -- shutting down server");
break;
}
}
else if (cld == 0) {
/* Exit event was signaled */
- ap_log_error(APLOG_MARK, APLOG_INFO, APR_SUCCESS, server_conf,
+ ap_log_error(APLOG_MARK, APLOG_INFO, APR_SUCCESS, ap_server_conf,
"Child %d: Exit event signaled. Child process is ending.", my_pid);
break;
}
/* MaxRequestsPerChild event set by the worker threads.
* Signal the parent to restart
*/
- ap_log_error(APLOG_MARK, APLOG_INFO, APR_SUCCESS, server_conf,
+ ap_log_error(APLOG_MARK, APLOG_INFO, APR_SUCCESS, ap_server_conf,
"Child %d: Process exiting because it reached "
"MaxRequestsPerChild. Signaling the parent to "
"restart a new child process.", my_pid);
/* Release the start_mutex to let the new process (in the restart
* scenario) a chance to begin accepting and servicing requests
*/
- ap_log_error(APLOG_MARK,APLOG_INFO, APR_SUCCESS, server_conf,
+ ap_log_error(APLOG_MARK,APLOG_INFO, APR_SUCCESS, ap_server_conf,
"Child %d: Releasing the start mutex", my_pid);
apr_lock_release(start_mutex);
else { /* Windows NT/2000 */
/* Post worker threads blocked on the ThreadDispatch IOCompletion port */
while (g_blocked_threads > 0) {
- ap_log_error(APLOG_MARK,APLOG_INFO, APR_SUCCESS, server_conf,
+ ap_log_error(APLOG_MARK,APLOG_INFO, APR_SUCCESS, ap_server_conf,
"Child %d: %d threads blocked on the completion port", my_pid, g_blocked_threads);
for (i=g_blocked_threads; i > 0; i--) {
PostQueuedCompletionStatus(ThreadDispatchIOCP, 0, IOCP_SHUTDOWN, NULL);
}
/* Give busy worker threads a chance to service their connections */
- ap_log_error(APLOG_MARK,APLOG_INFO, APR_SUCCESS, server_conf,
+ ap_log_error(APLOG_MARK,APLOG_INFO, APR_SUCCESS, ap_server_conf,
"Child %d: Waiting for %d threads to die.", my_pid, nthreads);
end_time = time(NULL) + 180;
while (nthreads) {
TerminateThread(child_handles[i], 1);
CloseHandle(child_handles[i]);
}
- ap_log_error(APLOG_MARK,APLOG_INFO, APR_SUCCESS, server_conf,
+ ap_log_error(APLOG_MARK,APLOG_INFO, APR_SUCCESS, ap_server_conf,
"Child %d: All worker threads have ended.", my_pid);
CloseHandle(allowed_globals.jobsemaphore);
*/
rv = GetModuleFileName(NULL, buf, sizeof(buf));
if (rv == sizeof(buf)) {
- ap_log_error(APLOG_MARK, APLOG_CRIT, ERROR_BAD_PATHNAME, server_conf,
+ ap_log_error(APLOG_MARK, APLOG_CRIT, ERROR_BAD_PATHNAME, ap_server_conf,
"Parent: Path to Apache process too long");
return -1;
} else if (rv == 0) {
- ap_log_error(APLOG_MARK, APLOG_CRIT, apr_get_os_error(), server_conf,
+ ap_log_error(APLOG_MARK, APLOG_CRIT, apr_get_os_error(), ap_server_conf,
"Parent: GetModuleFileName() returned NULL for current process.");
return -1;
}
/* Build the command line */
pCommand = apr_psprintf(p, "\"%s\"", buf);
- for (i = 1; i < server_conf->process->argc; i++) {
- pCommand = apr_pstrcat(p, pCommand, " \"", server_conf->process->argv[i], "\"", NULL);
+ for (i = 1; i < ap_server_conf->process->argc; i++) {
+ pCommand = apr_pstrcat(p, pCommand, " \"", ap_server_conf->process->argv[i], "\"", NULL);
}
/* Build the environment, since Win9x disrespects the active env */
pEnvVar = '\0';
/* Create a pipe to send socket info to the child */
if (!CreatePipe(&hPipeRead, &hPipeWrite, &sa, 0)) {
- ap_log_error(APLOG_MARK, APLOG_CRIT, apr_get_os_error(), server_conf,
+ ap_log_error(APLOG_MARK, APLOG_CRIT, apr_get_os_error(), ap_server_conf,
"Parent: Unable to create pipe to child process.");
return -1;
}
pEnvBlock, /* Environment block */
NULL,
&si, &pi)) {
- ap_log_error(APLOG_MARK, APLOG_CRIT, apr_get_os_error(), server_conf,
+ ap_log_error(APLOG_MARK, APLOG_CRIT, apr_get_os_error(), ap_server_conf,
"Parent: Not able to create the child process.");
/*
* We must close the handles to the new process and its main thread
return -1;
}
- ap_log_error(APLOG_MARK, APLOG_INFO, APR_SUCCESS, server_conf,
+ ap_log_error(APLOG_MARK, APLOG_INFO, APR_SUCCESS, ap_server_conf,
"Parent: Created child process %d", pi.dwProcessId);
SetEnvironmentVariable("AP_PARENT_PID",NULL);
sa.lpSecurityDescriptor = NULL;
*child_exit_event = CreateEvent(&sa, TRUE, FALSE, apr_psprintf(pconf,"apC%d", pi.dwProcessId));
if (!(*child_exit_event)) {
- ap_log_error(APLOG_MARK, APLOG_CRIT, apr_get_os_error(), server_conf,
+ ap_log_error(APLOG_MARK, APLOG_CRIT, apr_get_os_error(), ap_server_conf,
"Parent: Could not create exit event for child process");
CloseHandle(pi.hProcess);
CloseHandle(pi.hThread);
int nsd;
lpWSAProtocolInfo = apr_pcalloc(p, sizeof(WSAPROTOCOL_INFO));
apr_os_sock_get(&nsd,lr->sd);
- ap_log_error(APLOG_MARK, APLOG_INFO, APR_SUCCESS, server_conf,
+ ap_log_error(APLOG_MARK, APLOG_INFO, APR_SUCCESS, ap_server_conf,
"Parent: Duplicating socket %d and sending it to child process %d",
nsd, pi.dwProcessId);
if (WSADuplicateSocket(nsd, pi.dwProcessId,
lpWSAProtocolInfo) == SOCKET_ERROR) {
- ap_log_error(APLOG_MARK, APLOG_CRIT, apr_get_netos_error(), server_conf,
+ ap_log_error(APLOG_MARK, APLOG_CRIT, apr_get_netos_error(), ap_server_conf,
"Parent: WSADuplicateSocket failed for socket %d. Check the FAQ.", lr->sd );
return -1;
}
if (!WriteFile(hPipeWrite, lpWSAProtocolInfo, (DWORD) sizeof(WSAPROTOCOL_INFO),
&BytesWritten,
(LPOVERLAPPED) NULL)) {
- ap_log_error(APLOG_MARK, APLOG_CRIT, apr_get_os_error(), server_conf,
+ ap_log_error(APLOG_MARK, APLOG_CRIT, apr_get_os_error(), ap_server_conf,
"Parent: Unable to write duplicated socket %d to the child.", lr->sd );
return -1;
}
- ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_INFO, APR_SUCCESS, server_conf,
+ ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_INFO, APR_SUCCESS, ap_server_conf,
"Parent: BytesWritten = %d WSAProtocolInfo = %x20", BytesWritten, *lpWSAProtocolInfo);
}
rv = create_process(pconf, &child_handle, &child_exit_event);
if (rv < 0)
{
- ap_log_error(APLOG_MARK, APLOG_CRIT, apr_get_os_error(), server_conf,
+ ap_log_error(APLOG_MARK, APLOG_CRIT, apr_get_os_error(), ap_server_conf,
"master_main: create child process failed. Exiting.");
shutdown_pending = 1;
goto die_now;
cld = rv - WAIT_OBJECT_0;
if (rv == WAIT_FAILED) {
/* Something serious is wrong */
- ap_log_error(APLOG_MARK,APLOG_CRIT, apr_get_os_error(), server_conf,
+ ap_log_error(APLOG_MARK,APLOG_CRIT, apr_get_os_error(), ap_server_conf,
"master_main: WaitForMultipeObjects WAIT_FAILED -- doing server shutdown");
shutdown_pending = 1;
}
else {
/* The child process exited prematurely due to a fatal error. */
restart_pending = 1;
- ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_INFO, APR_SUCCESS, server_conf,
+ ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_INFO, APR_SUCCESS, ap_server_conf,
"Parent: CHILD PROCESS FAILED -- Restarting the child process.");
event_handles[CHILD_HANDLE] = NULL;
}
/* Signal the child processes to exit */
if (SetEvent(child_exit_event) == 0) {
- ap_log_error(APLOG_MARK,APLOG_ERR, apr_get_os_error(), server_conf,
+ ap_log_error(APLOG_MARK,APLOG_ERR, apr_get_os_error(), ap_server_conf,
"Parent: SetEvent for child process %d failed", event_handles[CHILD_HANDLE]);
}
rv = WaitForSingleObject(event_handles[CHILD_HANDLE], timeout);
if (rv == WAIT_OBJECT_0) {
- ap_log_error(APLOG_MARK,APLOG_INFO|APLOG_NOERRNO, APR_SUCCESS, server_conf,
+ ap_log_error(APLOG_MARK,APLOG_INFO|APLOG_NOERRNO, APR_SUCCESS, ap_server_conf,
"Parent: Child process %d exited successfully.", event_handles[CHILD_HANDLE]);
event_handles[CHILD_HANDLE] = NULL;
}
else {
- ap_log_error(APLOG_MARK,APLOG_INFO|APLOG_NOERRNO, APR_SUCCESS, server_conf,
+ ap_log_error(APLOG_MARK,APLOG_INFO|APLOG_NOERRNO, APR_SUCCESS, ap_server_conf,
"Parent: Forcing termination of child process %d ", event_handles[CHILD_HANDLE]);
TerminateProcess(event_handles[CHILD_HANDLE], 1);
event_handles[CHILD_HANDLE] = NULL;
FALSE, /* Inherit flag */
DUPLICATE_CLOSE_SOURCE | DUPLICATE_SAME_ACCESS)) {
ap_log_error(APLOG_MARK, APLOG_ERR, apr_get_os_error(),
- server_conf,
+ ap_server_conf,
"set_listeners_noninheritable: DuplicateHandle failed.");
return 0;
}
static int restart_num = 0;
apr_status_t rv = 0;
- server_conf = server;
+ ap_server_conf = server;
/* Handle the following SCM aspects in this phase:
*
*/
shutdown_event = CreateEvent(sa, FALSE, FALSE, signal_shutdown_name);
if (!shutdown_event) {
- ap_log_error(APLOG_MARK, APLOG_CRIT, apr_get_os_error(), server_conf,
+ ap_log_error(APLOG_MARK, APLOG_CRIT, apr_get_os_error(), ap_server_conf,
"Parent: Cannot create shutdown event %s", signal_shutdown_name);
CleanNullACL((void *)sa);
exit(1);
restart_event = CreateEvent(sa, FALSE, FALSE, signal_restart_name);
if (!restart_event) {
CloseHandle(shutdown_event);
- ap_log_error(APLOG_MARK, APLOG_CRIT, apr_get_os_error(), server_conf,
+ ap_log_error(APLOG_MARK, APLOG_CRIT, apr_get_os_error(), ap_server_conf,
"Parent: Cannot create restart event %s", signal_restart_name);
CleanNullACL((void *)sa);
exit(1);
{
rv = mpm_service_to_start(&service_name);
if (rv != APR_SUCCESS) {
- ap_log_error(APLOG_MARK,APLOG_ERR, rv, server_conf,
+ ap_log_error(APLOG_MARK,APLOG_ERR, rv, ap_server_conf,
"%s: Unable to start the service manager.",
service_name);
exit(1);
* child process from entering the accept loop at once.
*/
apr_lock_create(&start_mutex,APR_MUTEX, APR_CROSS_PROCESS, signal_name_prefix,
- server_conf->process->pool);
+ ap_server_conf->process->pool);
}
}
else /* parent_pid != my_pid */
static int restart = 0; /* Default is "not a restart" */
pconf = _pconf;
- server_conf = s;
+ ap_server_conf = s;
if ((parent_pid != my_pid) || one_process) {
/* Child process or in one_process (debug) mode */
- ap_log_error(APLOG_MARK, APLOG_INFO, APR_SUCCESS, server_conf,
+ ap_log_error(APLOG_MARK, APLOG_INFO, APR_SUCCESS, ap_server_conf,
"Child %d: Child process is running", my_pid);
/* Set up the scoreboard. */
ap_run_pre_mpm(pconf, SB_NOT_SHARED);
if (one_process) {
- if (ap_setup_listeners(server_conf) < 1) {
+ if (ap_setup_listeners(ap_server_conf) < 1) {
return 1;
}
}
else {
- get_listeners_from_parent(server_conf);
+ get_listeners_from_parent(ap_server_conf);
}
if (!set_listeners_noninheritable(pconf)) {
return 1;
}
child_main();
- ap_log_error(APLOG_MARK, APLOG_INFO, APR_SUCCESS, server_conf,
+ ap_log_error(APLOG_MARK, APLOG_INFO, APR_SUCCESS, ap_server_conf,
"Child %d: Child process is exiting", my_pid);
return 1;
}
else {
/* Parent process */
- if (ap_setup_listeners(server_conf) < 1) {
+ if (ap_setup_listeners(ap_server_conf) < 1) {
ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, s,
"no listening sockets available, shutting down");
return 1;
if (!set_listeners_noninheritable(pconf)) {
return 1;
}
- restart = master_main(server_conf, shutdown_event, restart_event);
+ restart = master_main(ap_server_conf, shutdown_event, restart_event);
if (!restart) {
/* Shutting down. Clean up... */
if (pidfile != NULL && unlink(pidfile) == 0) {
ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_INFO, APR_SUCCESS,
- server_conf, "removed PID file %s (pid=%ld)",
+ ap_server_conf, "removed PID file %s (pid=%ld)",
pidfile, GetCurrentProcessId());
}
apr_lock_destroy(start_mutex);