From: Ryan Bloom Date: Sun, 30 Apr 2000 21:21:51 +0000 (+0000) Subject: Make piped logs work again in 2.0. The next step is reliable piped logs. X-Git-Tag: APACHE_2_0_ALPHA_4~214 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0a2922931521a3b6bdfa0e6f422e4e3f82f175e4;p=thirdparty%2Fapache%2Fhttpd.git Make piped logs work again in 2.0. The next step is reliable piped logs. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85114 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/server/log.c b/server/log.c index c8319968d30..e7f0b47ea79 100644 --- a/server/log.c +++ b/server/log.c @@ -170,9 +170,6 @@ static int log_child(ap_pool_t *p, const char *progname, ap_procattr_t *procattr; ap_proc_t *procnew; - ap_block_alarms(); - ap_cleanup_for_exec(); - #ifdef SIGHUP /* No concept of a child process on Win32 */ ap_signal(SIGHUP, SIG_IGN); @@ -187,7 +184,12 @@ static int log_child(ap_pool_t *p, const char *progname, rc = -1; } else { - rc = ap_create_process(&procnew, progname, NULL, NULL, procattr, p); + char **args; + const char *pname; + + ap_tokenize_to_argv(progname, &args, p); + pname = ap_pstrdup(p, args[0]); + rc = ap_create_process(&procnew, pname, args, NULL, procattr, p); if (rc == APR_SUCCESS) { ap_note_subprocess(p, procnew, kill_after_timeout); @@ -594,9 +596,7 @@ static int piped_log_spawn(piped_log *pl) /* pjr - calls to block and unblock alarms weren't here before, was this */ /* an oversight or intentional? */ -/* ap_block_alarms(); */ - ap_cleanup_for_exec(); #ifdef SIGHUP ap_signal(SIGHUP, SIG_IGN); #endif @@ -612,9 +612,11 @@ static int piped_log_spawn(piped_log *pl) else { rc = ap_create_process(&procnew, pl->program, NULL, NULL, procattr, pl->p); - if (rc == APR_SUCCESS) { /* pjr - This no longer happens inside the child, */ - RAISE_SIGSTOP(PIPED_LOG_SPAWN); /* I am assuming that if ap_create_process was */ - /* successful that the child is running. */ + if (rc == APR_SUCCESS) { + /* pjr - This no longer happens inside the child, */ + /* I am assuming that if ap_create_process was */ + /* successful that the child is running. */ + RAISE_SIGSTOP(PIPED_LOG_SPAWN); pl->pid = procnew; ap_get_os_proc(&pid, procnew); ap_register_other_child(pid, piped_log_maintenance, pl, ap_piped_log_write_fd(pl));