Return-Path: Delivered-To: apmail-apache-cvs-archive@apache.org Received: (qmail 89042 invoked by uid 500); 23 May 2000 21:04:09 -0000 Mailing-List: contact apache-cvs-help@apache.org; run by ezmlm Precedence: bulk X-No-Archive: yes Reply-To: new-httpd@apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list apache-cvs@apache.org Received: (qmail 89023 invoked by uid 500); 23 May 2000 21:04:06 -0000 Delivered-To: apmail-apache-2.0-cvs@apache.org Date: 23 May 2000 21:04:05 -0000 Message-ID: <20000523210405.89008.qmail@locus.apache.org> From: rbb@locus.apache.org To: apache-2.0-cvs@apache.org Subject: cvs commit: apache-2.0/src/modules/standard mod_cgi.c mod_include.c rbb 00/05/23 14:04:04 Modified: src/lib/apr/include apr_portable.h apr_thread_proc.h src/lib/apr/test testproc.c testsock.c src/lib/apr/threadproc/unix proc.c procsup.c threadproc.h src/main http_log.c mpm_common.c src/modules/mpm/prefork prefork.c src/modules/standard mod_cgi.c mod_include.c Log: Convert ap_proc_t to a complete type. This lets us access the pid directly. Only the prefork MPM has been ported so far, the rest of the Unix MPM's are coming later today. Revision Changes Path 1.33 +0 -28 apache-2.0/src/lib/apr/include/apr_portable.h Index: apr_portable.h =================================================================== RCS file: /home/cvs/apache-2.0/src/lib/apr/include/apr_portable.h,v retrieving revision 1.32 retrieving revision 1.33 diff -u -r1.32 -r1.33 --- apr_portable.h 2000/04/16 04:46:56 1.32 +++ apr_portable.h 2000/05/23 21:03:56 1.33 @@ -235,19 +235,6 @@ /* -=head1 ap_status_t ap_get_os_proc(ap_os_proc_t *theproc, ap_proc_t *proc) - -B - - arg 1) The os specific proc we are converting to - arg 2) The apr proc we are converting - -=cut - */ -ap_status_t ap_get_os_proc(ap_os_proc_t *theproc, ap_proc_t *proc); - -/* - =head1 ap_status_t ap_get_os_exp_time(ap_os_exp_time_t **ostime, ap_exploded_time_t *aprtime) B @@ -360,21 +347,6 @@ =cut */ ap_status_t ap_put_os_lock(ap_lock_t **lock, ap_os_lock_t *thelock, - ap_pool_t *cont); - -/* - -=head1 ap_status_t ap_put_os_proc(ap_proc_t *proc, ap_os_proc_t *theproc, ap_pool_t *cont) - -B - - arg 1) The apr proc we are converting to. - arg 2) The os specific proc to convert - arg 3) The pool to use if it is needed. - -=cut - */ -ap_status_t ap_put_os_proc(ap_proc_t **proc, ap_os_proc_t *theproc, ap_pool_t *cont); /* 1.32 +15 -78 apache-2.0/src/lib/apr/include/apr_thread_proc.h Index: apr_thread_proc.h =================================================================== RCS file: /home/cvs/apache-2.0/src/lib/apr/include/apr_thread_proc.h,v retrieving revision 1.31 retrieving revision 1.32 diff -u -r1.31 -r1.32 --- apr_thread_proc.h 2000/05/18 02:17:23 1.31 +++ apr_thread_proc.h 2000/05/23 21:03:56 1.32 @@ -87,9 +87,15 @@ * us knowing ... buggy os? */ #endif /* APR_HAS_OTHER_CHILD */ +typedef struct ap_proc_t { + pid_t pid; + ap_file_t *stdin; /* Parent's side of pipe to child's stdin */ + ap_file_t *stdout; /* Parent's side of pipe to child's stdout */ + ap_file_t *stderr; /* Parent's side of pipe to child's stdouterr */ +} ap_proc_t; + typedef struct ap_thread_t ap_thread_t; typedef struct ap_threadattr_t ap_threadattr_t; -typedef struct ap_proc_t ap_proc_t; typedef struct ap_procattr_t ap_procattr_t; typedef struct ap_threadkey_t ap_threadkey_t; @@ -447,79 +453,10 @@ */ ap_status_t ap_setprocattr_detach(ap_procattr_t *attr, ap_int32_t detach); -/* - -=head1 ap_status_t ap_get_procdata(char *key, void *data, ap_proc_t *proc) - -B - - arg 1) The key associated with the data to retreive. - arg 2) The user data associated with the proc. - arg 3) The currently open proc. - -=cut - */ -ap_status_t ap_get_procdata(char *key, void *data, ap_proc_t *proc); - -/* - -=head1 ap_status_t ap_set_procdata(void *data, char *key, ap_status_t (*cleanup) (void *), ap_proc_t *proc) - -B - - arg 1) The user data to associate with the file. - arg 2) The key to use for associating data with the file. - arg 3) The cleanup routine to use when the file is destroyed. - arg 4) The current process. - -=cut - */ -ap_status_t ap_set_procdata(void *data, char *key, - ap_status_t (*cleanup) (void *), ap_proc_t *proc); - -/* - -=head1 ap_status_t ap_get_childin(ap_file_t **new, ap_proc_t *proc) - -B - - arg 1) The returned file handle. - arg 2) The process handle that corresponds to the desired child process - -=cut - */ -ap_status_t ap_get_childin(ap_file_t **new, ap_proc_t *proc); - -/* - -=head1 ap_status_t ap_get_childout(ap_file_t **new, ap_proc_t *proc) - -B - - arg 1) The returned file handle. - arg 2) The process handle that corresponds to the desired child process - -=cut - */ -ap_status_t ap_get_childout(ap_file_t **new, ap_proc_t *proc); - -/* - -=head1 ap_status_t ap_get_childerr(ap_file_t **new, ap_proc_t *proc) - -B - - arg 1) The returned file handle. - arg 2) The process handle that corresponds to the desired child process - -=cut - */ -ap_status_t ap_get_childerr(ap_file_t **new, ap_proc_t *proc); - #if APR_HAS_FORK /* -=head1 ap_status_t ap_fork(ap_proc_t **proc, ap_pool_t *cont) +=head1 ap_status_t ap_fork(ap_proc_t *proc, ap_pool_t *cont) B @@ -528,12 +465,12 @@ =cut */ -ap_status_t ap_fork(ap_proc_t **proc, ap_pool_t *cont); +ap_status_t ap_fork(ap_proc_t *proc, ap_pool_t *cont); #endif /* -=head1 ap_status_t ap_create_process(ap_proc_t **new, const char *progname, char *const args[], char **env, ap_procattr_t *attr, ap_pool_t *cont) +=head1 ap_status_t ap_create_process(ap_proc_t *new, const char *progname, char *const args[], char **env, ap_procattr_t *attr, ap_pool_t *cont) B @@ -549,7 +486,7 @@ =cut */ -ap_status_t ap_create_process(ap_proc_t **new, const char *progname, +ap_status_t ap_create_process(ap_proc_t *new, const char *progname, char *const args[], char **env, ap_procattr_t *attr, ap_pool_t *cont); @@ -577,7 +514,7 @@ /* -=head1 ap_status_t ap_wait_all_procs(ap_proc_t **proc, ap_wait_t *status, ap_wait_how waithow, ap_pool_t *p) +=head1 ap_status_t ap_wait_all_procs(ap_proc_t *proc, ap_wait_t *status, ap_wait_how waithow, ap_pool_t *p) B @@ -595,12 +532,12 @@ =cut */ -ap_status_t ap_wait_all_procs(ap_proc_t **proc, ap_wait_t *status, +ap_status_t ap_wait_all_procs(ap_proc_t *proc, ap_wait_t *status, ap_wait_how_e waithow, ap_pool_t *p); /* -=head1 ap_status_t ap_detach(ap_proc_t **new, ap_pool_t *cont) +=head1 ap_status_t ap_detach(ap_proc_t *new, ap_pool_t *cont) B @@ -609,7 +546,7 @@ =cut */ -ap_status_t ap_detach(ap_proc_t **new, ap_pool_t *cont); +ap_status_t ap_detach(ap_proc_t *new, ap_pool_t *cont); #if APR_HAS_OTHER_CHILD /* 1.16 +4 -10 apache-2.0/src/lib/apr/test/testproc.c Index: testproc.c =================================================================== RCS file: /home/cvs/apache-2.0/src/lib/apr/test/testproc.c,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- testproc.c 2000/04/14 15:58:44 1.15 +++ testproc.c 2000/05/23 21:03:58 1.16 @@ -71,7 +71,7 @@ int main(int argc, char *argv[]) { ap_pool_t *context; - ap_proc_t *newproc; + ap_proc_t newproc; ap_procattr_t *attr; ap_file_t *testfile = NULL; ap_ssize_t length; @@ -143,10 +143,7 @@ fprintf(stdout, "OK.\n"); fprintf(stdout, "Grabbing child's stdin......."); - if (ap_get_childin(&testfile, newproc) != APR_SUCCESS) { - fprintf(stderr, "Could not get child's stdout\n"); - exit(-1); - } + testfile = newproc.stdin; fprintf(stdout, "OK.\n"); length = 256; @@ -157,10 +154,7 @@ else fprintf(stderr, "Write failed.\n"); fprintf(stdout, "Grabbing child's stdout......."); - if (ap_get_childout(&testfile, newproc) != APR_SUCCESS) { - fprintf(stderr, "Could not get child's stdout\n"); - exit(-1); - } + testfile = newproc.stdout; fprintf(stdout, "OK.\n"); length = 256; @@ -174,7 +168,7 @@ else fprintf(stderr, "Read failed.\n"); fprintf(stdout, "Waiting for child to die......."); - if (ap_wait_proc(newproc, APR_WAIT) != APR_CHILD_DONE) { + if (ap_wait_proc(&newproc, APR_WAIT) != APR_CHILD_DONE) { fprintf(stderr, "Wait for child failed\n"); exit(-1); } 1.9 +8 -8 apache-2.0/src/lib/apr/test/testsock.c Index: testsock.c =================================================================== RCS file: /home/cvs/apache-2.0/src/lib/apr/test/testsock.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- testsock.c 2000/04/14 15:58:45 1.8 +++ testsock.c 2000/05/23 21:03:58 1.9 @@ -68,8 +68,8 @@ ap_procattr_t *attr1 = NULL; ap_procattr_t *attr2 = NULL; - ap_proc_t *proc1 = NULL; - ap_proc_t *proc2 = NULL; + ap_proc_t proc1; + ap_proc_t proc2; ap_status_t s1; ap_status_t s2; char *args[2]; @@ -115,18 +115,18 @@ exit(-1); } - while ((s1 = ap_wait_proc(proc1, APR_NOWAIT)) != APR_CHILD_DONE || - (s2 = ap_wait_proc(proc2, APR_NOWAIT)) != APR_CHILD_DONE) { + while ((s1 = ap_wait_proc(&proc1, APR_NOWAIT)) != APR_CHILD_DONE || + (s2 = ap_wait_proc(&proc2, APR_NOWAIT)) != APR_CHILD_DONE) { continue; } if (s1 == APR_SUCCESS) { - ap_kill(proc2, SIGTERM); - ap_wait_proc(proc2, APR_WAIT); + ap_kill(&proc2, SIGTERM); + ap_wait_proc(&proc2, APR_WAIT); } else { - ap_kill(proc1, SIGTERM); - ap_wait_proc(proc1, APR_WAIT); + ap_kill(&proc1, SIGTERM); + ap_wait_proc(&proc1, APR_WAIT); } fprintf(stdout, "Network test completed.\n"); 1.28 +19 -73 apache-2.0/src/lib/apr/threadproc/unix/proc.c Index: proc.c =================================================================== RCS file: /home/cvs/apache-2.0/src/lib/apr/threadproc/unix/proc.c,v retrieving revision 1.27 retrieving revision 1.28 diff -u -r1.27 -r1.28 --- proc.c 2000/05/18 02:17:24 1.27 +++ proc.c 2000/05/23 21:03:59 1.28 @@ -191,46 +191,43 @@ return APR_SUCCESS; } -ap_status_t ap_fork(ap_proc_t **proc, ap_pool_t *cont) +ap_status_t ap_fork(ap_proc_t *proc, ap_pool_t *cont) { int pid; - (*proc) = ap_pcalloc(cont, sizeof(ap_proc_t)); - if ((pid = fork()) < 0) { return errno; } else if (pid == 0) { - (*proc)->pid = pid; - (*proc)->attr = NULL; + proc->pid = pid; + proc->stdin = NULL; + proc->stdout = NULL; + proc->stderr = NULL; return APR_INCHILD; } - (*proc)->pid = pid; - (*proc)->attr = NULL; + proc->pid = pid; + proc->stdin = NULL; + proc->stdout = NULL; + proc->stderr = NULL; return APR_INPARENT; } -ap_status_t ap_create_process(ap_proc_t **new, const char *progname, +ap_status_t ap_create_process(ap_proc_t *new, const char *progname, char *const args[], char **env, ap_procattr_t *attr, ap_pool_t *cont) { int i; typedef const char *my_stupid_string; my_stupid_string *newargs; - ap_proc_t *pgrp; - - (*new) = (ap_proc_t *)ap_pcalloc(cont, sizeof(ap_proc_t)); - - if ((*new) == NULL) { - return APR_ENOMEM; - } + ap_proc_t pgrp; - (*new)->cntxt = cont; - - if (((*new)->pid = fork()) < 0) { + new->stdin = attr->parent_in; + new->stderr = attr->parent_err; + new->stdout = attr->parent_out; + if ((new->pid = fork()) < 0) { return errno; } - else if ((*new)->pid == 0) { + else if (new->pid == 0) { /* child process */ if (attr->child_in) { ap_close(attr->parent_in); @@ -297,49 +294,22 @@ if (attr->child_err) { ap_close(attr->child_err); } - - (*new)->attr = attr; return APR_SUCCESS; } - -ap_status_t ap_get_childin(ap_file_t **new, ap_proc_t *proc) -{ - (*new) = proc->attr->parent_in; - return APR_SUCCESS; -} - -ap_status_t ap_get_childout(ap_file_t **new, ap_proc_t *proc) -{ - (*new) = proc->attr->parent_out; - return APR_SUCCESS; -} - -ap_status_t ap_get_childerr(ap_file_t **new, ap_proc_t *proc) -{ - (*new) = proc->attr->parent_err; - return APR_SUCCESS; -} -ap_status_t ap_wait_all_procs(ap_proc_t **proc, ap_wait_t *status, +ap_status_t ap_wait_all_procs(ap_proc_t *proc, ap_wait_t *status, ap_wait_how_e waithow, ap_pool_t *p) { - pid_t pid; int waitpid_options = WUNTRACED; if (waithow != APR_WAIT) { waitpid_options |= WNOHANG; } - if ((pid = waitpid(-1, status, waitpid_options)) > 0) { - if (!*proc) { - (*proc) = ap_pcalloc(p, sizeof(ap_proc_t)); - (*proc)->cntxt = p; - } - (*proc)->pid = pid; + if ((proc->pid = waitpid(-1, status, waitpid_options)) > 0) { return APR_CHILD_DONE; } - else if (pid == 0) { - (*proc) = NULL; + else if (proc->pid == 0) { return APR_CHILD_NOTDONE; } return errno; @@ -368,27 +338,3 @@ } return errno; } - -ap_status_t ap_get_os_proc(ap_os_proc_t *theproc, ap_proc_t *proc) -{ - if (proc == NULL) { - return APR_ENOPROC; - } - *theproc = proc->pid; - return APR_SUCCESS; -} - -ap_status_t ap_put_os_proc(ap_proc_t **proc, ap_os_proc_t *theproc, - ap_pool_t *cont) -{ - if (cont == NULL) { - return APR_ENOPOOL; - } - if ((*proc) == NULL) { - (*proc) = (ap_proc_t *)ap_pcalloc(cont, sizeof(ap_proc_t)); - (*proc)->cntxt = cont; - } - (*proc)->pid = *theproc; - return APR_SUCCESS; -} - 1.19 +2 -31 apache-2.0/src/lib/apr/threadproc/unix/procsup.c Index: procsup.c =================================================================== RCS file: /home/cvs/apache-2.0/src/lib/apr/threadproc/unix/procsup.c,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- procsup.c 2000/05/17 23:12:56 1.18 +++ procsup.c 2000/05/23 21:03:59 1.19 @@ -54,14 +54,10 @@ #include "threadproc.h" -ap_status_t ap_detach(ap_proc_t **new, ap_pool_t *cont) +ap_status_t ap_detach(ap_proc_t *new, ap_pool_t *cont) { int x; - (*new) = (ap_proc_t *)ap_palloc(cont, sizeof(ap_proc_t)); - (*new)->cntxt = cont; - (*new)->attr = NULL; - chdir("/"); #if !defined(MPE) && !defined(OS2) && !defined(TPF) && !defined(BEOS) /* Don't detach for MPE because child processes can't survive the death of @@ -76,7 +72,7 @@ /* RAISE_SIGSTOP(DETACH);*/ #endif #if HAVE_SETSID - if (((*new)->pid = setsid()) == -1) { + if ((new->pid = setsid()) == -1) { return errno; } #elif defined(NEXT) || defined(NEWSOS) @@ -116,28 +112,3 @@ } return APR_SUCCESS; } - -ap_status_t ap_get_procdata(char *key, void *data, ap_proc_t *proc) -{ - if (proc != NULL) { - return ap_get_userdata(data, key, proc->cntxt); - } - else { - data = NULL; - return APR_ENOPROC; - } -} - -ap_status_t ap_set_procdata(void *data, char *key, - ap_status_t (*cleanup) (void *), - ap_proc_t *proc) -{ - if (proc != NULL) { - return ap_set_userdata(data, key, cleanup, proc->cntxt); - } - else { - data = NULL; - return APR_ENOPROC; - } -} - 1.11 +1 -7 apache-2.0/src/lib/apr/threadproc/unix/threadproc.h Index: threadproc.h =================================================================== RCS file: /home/cvs/apache-2.0/src/lib/apr/threadproc/unix/threadproc.h,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- threadproc.h 2000/04/22 06:16:47 1.10 +++ threadproc.h 2000/05/23 21:03:59 1.11 @@ -111,16 +111,10 @@ ap_int32_t detached; }; -struct ap_proc_t { - ap_pool_t *cntxt; - pid_t pid; - struct ap_procattr_t *attr; -}; - /*This will move to ap_threadproc.h in time, but I need to figure it out * on windows first. :) */ -ap_status_t ap_detach(struct ap_proc_t **, ap_pool_t *); +ap_status_t ap_detach(struct ap_proc_t *, ap_pool_t *); #endif /* ! THREAD_PROC_H */ 1.49 +6 -6 apache-2.0/src/main/http_log.c Index: http_log.c =================================================================== RCS file: /home/cvs/apache-2.0/src/main/http_log.c,v retrieving revision 1.48 retrieving revision 1.49 diff -u -r1.48 -r1.49 --- http_log.c 2000/05/21 05:31:06 1.48 +++ http_log.c 2000/05/23 21:04:00 1.49 @@ -168,7 +168,7 @@ */ int rc = -1; ap_procattr_t *procattr; - ap_proc_t *procnew; + ap_proc_t procnew; #ifdef SIGHUP /* No concept of a child process on Win32 */ @@ -192,8 +192,8 @@ rc = ap_create_process(&procnew, pname, args, NULL, procattr, p); if (rc == APR_SUCCESS) { - ap_note_subprocess(p, procnew, kill_after_timeout); - ap_get_childin(fpin, procnew); + ap_note_subprocess(p, &procnew, kill_after_timeout); + (*fpin) = procnew.stdin; } } @@ -589,7 +589,7 @@ { int rc; ap_procattr_t *procattr; - ap_proc_t *procnew; + ap_proc_t procnew; #ifdef SIGHUP ap_signal(SIGHUP, SIG_IGN); @@ -617,8 +617,8 @@ /* I am assuming that if ap_create_process was */ /* successful that the child is running. */ RAISE_SIGSTOP(PIPED_LOG_SPAWN); - pl->pid = procnew; - ap_register_other_child(procnew, piped_log_maintenance, pl, + pl->pid = &procnew; + ap_register_other_child(&procnew, piped_log_maintenance, pl, ap_piped_log_write_fd(pl), pl->p); } } 1.5 +2 -2 apache-2.0/src/main/mpm_common.c Index: mpm_common.c =================================================================== RCS file: /home/cvs/apache-2.0/src/main/mpm_common.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- mpm_common.c 2000/05/19 07:10:57 1.4 +++ mpm_common.c 2000/05/23 21:04:00 1.5 @@ -180,7 +180,7 @@ { struct timeval tv; ap_status_t rv; - ap_proc_t *ret = NULL; + ap_proc_t *ret; ++wait_or_timeout_counter; if (wait_or_timeout_counter == INTERVAL_OF_WRITABLE_PROBES) { @@ -189,7 +189,7 @@ ap_probe_writable_fds(); #endif } - rv = ap_wait_all_procs(&ret, status, APR_NOWAIT, p); + rv = ap_wait_all_procs(ret, status, APR_NOWAIT, p); if (ap_canonical_error(rv) == APR_EINTR) { return NULL; } 1.89 +7 -14 apache-2.0/src/modules/mpm/prefork/prefork.c Index: prefork.c =================================================================== RCS file: /home/cvs/apache-2.0/src/modules/mpm/prefork/prefork.c,v retrieving revision 1.88 retrieving revision 1.89 diff -u -r1.88 -r1.89 --- prefork.c 2000/05/19 07:14:54 1.88 +++ prefork.c 2000/05/23 21:04:02 1.89 @@ -1019,11 +1019,9 @@ static int find_child_by_pid(ap_proc_t *pid) { int i; - int actual_pid; - ap_get_os_proc(&actual_pid, pid); for (i = 0; i < ap_max_daemons_limit; ++i) - if (ap_scoreboard_image->parent[i].pid == actual_pid) + if (ap_scoreboard_image->parent[i].pid == pid->pid) return i; return -1; @@ -1798,10 +1796,8 @@ } -static void process_child_status(ap_proc_t *abs_pid, ap_wait_t status) +static void process_child_status(ap_proc_t *pid, ap_wait_t status) { - int pid; - ap_get_os_proc(&pid, abs_pid); /* Child died... if it died due to a fatal error, * we should simply bail out. */ @@ -1810,7 +1806,7 @@ ap_log_error(APLOG_MARK, APLOG_ALERT|APLOG_NOERRNO, 0, ap_server_conf, "Child %d returned a Fatal error... \n" "Apache is exiting!", - pid); + pid->pid); exit(APEXIT_CHILDFATAL); } if (WIFSIGNALED(status)) { @@ -1828,7 +1824,7 @@ 0, ap_server_conf, "child pid %d exit signal %s (%d), " "possible coredump in %s", - pid, (WTERMSIG(status) >= NumSIG) ? "" : + pid->pid, (WTERMSIG(status) >= NumSIG) ? "" : SYS_SIGLIST[WTERMSIG(status)], WTERMSIG(status), ap_coredump_dir); } @@ -1836,7 +1832,7 @@ #endif ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE, 0, ap_server_conf, - "child pid %d exit signal %s (%d)", pid, + "child pid %d exit signal %s (%d)", pid->pid, SYS_SIGLIST[WTERMSIG(status)], WTERMSIG(status)); #ifdef WCOREDUMP } @@ -1845,7 +1841,7 @@ ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE, ap_server_conf, "child pid %d exit signal %d", - pid, WTERMSIG(status)); + pid->pid, WTERMSIG(status)); #endif } } @@ -1994,12 +1990,9 @@ * scoreboard. Somehow we don't know about this * child. */ - ap_os_proc_t os_pid; - - ap_get_os_proc(&os_pid, pid); ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_WARNING, 0, ap_server_conf, - "long lost child came home! (pid %d)", os_pid); + "long lost child came home! (pid %d)", pid->pid); } /* Don't perform idle maintenance when a child dies, * only do it when there's a timeout. Remember only a 1.39 +5 -5 apache-2.0/src/modules/standard/mod_cgi.c Index: mod_cgi.c =================================================================== RCS file: /home/cvs/apache-2.0/src/modules/standard/mod_cgi.c,v retrieving revision 1.38 retrieving revision 1.39 diff -u -r1.38 -r1.39 --- mod_cgi.c 2000/05/21 05:31:07 1.38 +++ mod_cgi.c 2000/05/23 21:04:03 1.39 @@ -295,7 +295,7 @@ { char **env; ap_procattr_t *procattr; - ap_proc_t *procnew; + ap_proc_t procnew; ap_status_t rc = APR_SUCCESS; ap_file_t *file = NULL; ap_iol *iol; @@ -349,10 +349,10 @@ "couldn't create child process: %d: %s", rc, r->filename); } else { - ap_note_subprocess(p, procnew, kill_after_timeout); + ap_note_subprocess(p, &procnew, kill_after_timeout); /* Fill in BUFF structure for parents pipe to child's stdout */ - ap_get_childout(&file, procnew); + file = procnew.stdout; iol = ap_create_file_iol(file); if (!iol) return APR_EBADF; @@ -361,7 +361,7 @@ ap_bsetopt(*script_in, BO_TIMEOUT, &r->server->timeout); /* Fill in BUFF structure for parents pipe to child's stdin */ - ap_get_childin(&file, procnew); + file = procnew.stdin; iol = ap_create_file_iol(file); if (!iol) return APR_EBADF; @@ -370,7 +370,7 @@ ap_bsetopt(*script_out, BO_TIMEOUT, &r->server->timeout); /* Fill in BUFF structure for parents pipe to child's stderr */ - ap_get_childerr(&file, procnew); + file = procnew.stderr; iol = ap_create_file_iol(file); if (!iol) return APR_EBADF; 1.31 +3 -3 apache-2.0/src/modules/standard/mod_include.c Index: mod_include.c =================================================================== RCS file: /home/cvs/apache-2.0/src/modules/standard/mod_include.c,v retrieving revision 1.30 retrieving revision 1.31 diff -u -r1.30 -r1.31 --- mod_include.c 2000/05/23 03:04:30 1.30 +++ mod_include.c 2000/05/23 21:04:03 1.31 @@ -822,7 +822,7 @@ include_cmd_arg arg; BUFF *script_in; ap_procattr_t *procattr; - ap_proc_t *procnew; + ap_proc_t procnew; ap_status_t rc; ap_table_t *env = r->subprocess_env; char **argv; @@ -880,9 +880,9 @@ "couldn't create child process: %d: %s", rc, s); } else { - ap_note_subprocess(r->pool, procnew, kill_after_timeout); + ap_note_subprocess(r->pool, &procnew, kill_after_timeout); /* Fill in BUFF structure for parents pipe to child's stdout */ - ap_get_childout(&file, procnew); + file = procnew.stdout; iol = ap_create_file_iol(file); if (!iol) return APR_EBADF;