Lines Matching defs:process
161 * we use "events" instead. The parent apache process goes into a loop
168 * (where PID is the PID of the apache parent process). When one of these
178 * It can be called by any child or parent process, since it does not
310 if ((rv = apr_os_proc_mutex_put(child_start_mutex, &os_start, s->process->pool))
325 if ((rv = apr_os_shm_put(scoreboard_shm, &hScore, s->process->pool))
332 rv = ap_reopen_scoreboard(s->process->pool, scoreboard_shm, 1);
339 * process-local pointer arrays into the shared memory block.
430 * exclusively in the child process, receives them from the parent and
444 lr = apr_palloc(s->process->pool, sizeof(ap_listen_rec));
450 /* Open the pipe to the parent process to receive the inherited socket
451 * data. The sockets have been set to listening in the parent process.
479 apr_os_sock_put(&lr->sd, &nsd, s->process->pool);
497 * for the target process then send the WSAPROTOCOL_INFO
505 "Parent: Duplicating socket %d (%pI) and sending it to child process %lu",
569 * for the lifetime of this parent process.
575 ap_server_conf->process->argv[0]);
580 args = malloc((ap_server_conf->process->argc + 1) * sizeof (char*));
581 memcpy(args + 1, ap_server_conf->process->argv + 1,
582 (ap_server_conf->process->argc - 1) * sizeof (char*));
585 args[ap_server_conf->process->argc] = NULL;
604 "Parent: Could not create ready event for child process");
613 "Parent: Could not create exit event for child process");
633 "Parent: Failed to create the child process.");
642 "Parent: Created child process %d", new_child.pid);
661 * Give the child process a chance to run before dup'ing the sockets.
663 * WSADuplicateSocket runs before the child process initializes
704 * master_main() runs in the parent process. It creates the child
705 * process which handles HTTP requests then waits on one of three
710 * The restart event causes master_main to start a new child process and
711 * tells the old child process to exit (by setting the child_exit_event).
717 * 3. The child process calling ap_signal_parent(SIGNAL_PARENT_RESTART)
722 * The shutdown event causes master_main to tell the child process to
730 * child process handle
732 * The child process handle will be signaled if the child process
734 * of this event means that the child process has exited prematurely
736 * robustness, master_main will restart the child process under this
739 * master_main uses the child_exit_event to signal the child process
761 /* Create a single child process */
767 "master_main: create child process failed. Exiting.");
812 * then signal the child process to exit.
823 "Parent: SetEvent for child process event %pp failed.",
826 /* Don't wait to verify that the child process really exits,
833 /* The child process exited prematurely due to a fatal error. */
843 "Parent: child process %lu exited with status %lu -- Aborting.",
851 "Parent: child process %lu exited with status %lu -- Restarting.",
887 "Parent: SetEvent for child process event %pp failed",
894 "Parent: Child process %lu exited successfully.", child_pid);
900 "Parent: Forcing termination of child process %lu",
990 static void winnt_rewrite_args(process_rec *process)
1019 pconf = process->pconf;
1067 if ((apr_file_open_stdout(&outfile, process->pool) == APR_SUCCESS)
1068 && (apr_file_open_stdin(&infile, process->pool) == APR_SUCCESS))
1069 apr_file_dup2(infile, outfile, process->pool);
1094 /* Rewrite process->argv[];
1107 if ((rv = ap_os_proc_filepath(&binpath, process->pconf))
1110 "Failed to get the full path of %s", process->argv[0]);
1124 APR_FILEPATH_TRUENAME, process->pool);
1126 /* Use process->pool so that the rewritten argv
1127 * lasts for the lifetime of the server process,
1131 mpm_new_argv = apr_array_make(process->pool, process->argc + 2,
1133 *(const char **)apr_array_push(mpm_new_argv) = process->argv[0];
1141 apr_getopt_init(&opt, process->pool, process->argc, process->argv);
1156 service_set = mpm_service_set_name(process->pool, &service_name,
1169 apr_pstrdup(process->pool, optbuf);
1185 apr_pstrdup(process->pool, opt->argv[opt->ind++]);
1202 * process, the SCM will tell us our service name, and
1212 apr_filepath_set(def_server_root, process->pool);
1214 /* Any other process has a console, so we don't to begin
1222 mpm_nt_eventlog_stderr_open(service_name, process->pool);
1225 process->pool);
1230 /* Open a null handle to soak stdout in this process.
1237 process->pool)) == APR_SUCCESS) {
1239 if (apr_file_open_stdout(&nullstdout, process->pool)
1241 apr_file_dup2(nullstdout, nullfile, process->pool);
1248 service_set = mpm_service_set_name(process->pool, &service_name,
1275 mpm_signal_service(process->pool, 0);
1279 rv = mpm_merge_service_args(process->pool, mpm_new_argv,
1318 rv = mpm_service_install(process->pool, inst_argc, inst_argv, 1);
1329 rv = mpm_service_install(process->pool, inst_argc, inst_argv, 0);
1339 process->argc = mpm_new_argv->nelts;
1340 process->argv = (const char * const *) mpm_new_argv->elts;
1375 /* Open a null handle to soak stdout in this process.
1512 * these options to fail unexpectedly in another process.
1520 apr_pool_destroy(s->process->pool);
1529 apr_pool_destroy(s->process->pool);
1543 apr_pool_destroy(s->process->pool);
1550 apr_pool_destroy(s->process->pool);
1569 * Apache process ID. Shutdown is signaled by 'apache -k shutdown'.
1580 * Apache process ID. Restart is signaled by 'apache -k restart'.
1594 * one child process from entering the accept loop at once.
1598 ap_server_conf->process->pool);
1608 * handler to terminate the process.
1632 * (the parent process already has glomed on to them)
1656 /* This is a child process, not in single process mode */
1671 /* Single process mode - this lock doesn't even need to exist */
1673 APR_LOCK_DEFAULT, s->process->pool);
1698 if (ap_run_pre_mpm(s->process->pool, SB_SHARED) != OK) {
1705 /* The child process or in one_process (debug) mode
1708 "Child process is running");
1713 "Child process is exiting");