dgaudet 97/07/13 19:38:07
Modified: src mod_cgi.c mod_include.c mod_mime_magic.c Log: Use STD{IN,OUT,ERR}_FILENO as dictated by posix.1. Submitted by: Stanley Gambarin <[EMAIL PROTECTED]> Reviewed by: Dean Gaudet Revision Changes Path 1.47 +1 -1 apache/src/mod_cgi.c Index: mod_cgi.c =================================================================== RCS file: /export/home/cvs/apache/src/mod_cgi.c,v retrieving revision 1.46 retrieving revision 1.47 diff -C3 -r1.46 -r1.47 *** mod_cgi.c 1997/07/13 19:20:17 1.46 --- mod_cgi.c 1997/07/14 02:38:04 1.47 *************** *** 336,342 **** ap_snprintf(err_string, sizeof(err_string), "exec of %s failed, reason: %s (errno = %d)\n", r->filename, strerror(errno), errno); ! write(2, err_string, strlen(err_string)); exit(0); /* NOT REACHED */ return(0); --- 336,342 ---- ap_snprintf(err_string, sizeof(err_string), "exec of %s failed, reason: %s (errno = %d)\n", r->filename, strerror(errno), errno); ! write(STDERR_FILENO, err_string, strlen(err_string)); exit(0); /* NOT REACHED */ return(0); 1.40 +1 -1 apache/src/mod_include.c Index: mod_include.c =================================================================== RCS file: /export/home/cvs/apache/src/mod_include.c,v retrieving revision 1.39 retrieving revision 1.40 diff -C3 -r1.39 -r1.40 *** mod_include.c 1997/07/12 19:46:54 1.39 --- mod_include.c 1997/07/14 02:38:04 1.40 *************** *** 663,669 **** ap_snprintf(err_string, sizeof(err_string), "httpd: exec of %s failed, reason: %s (errno = %d)\n", SHELL_PATH, strerror(errno), errno); ! write (2, err_string, strlen(err_string)); exit(0); /* NOT REACHED */ return(child_pid); --- 663,669 ---- ap_snprintf(err_string, sizeof(err_string), "httpd: exec of %s failed, reason: %s (errno = %d)\n", SHELL_PATH, strerror(errno), errno); ! write (STDERR_FILENO, err_string, strlen(err_string)); exit(0); /* NOT REACHED */ return(child_pid); 1.4 +3 -3 apache/src/mod_mime_magic.c Index: mod_mime_magic.c =================================================================== RCS file: /export/home/cvs/apache/src/mod_mime_magic.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C3 -r1.3 -r1.4 *** mod_mime_magic.c 1997/07/12 20:20:35 1.3 --- mod_mime_magic.c 1997/07/14 02:38:05 1.4 *************** *** 2249,2265 **** } switch (fork()) { case 0: /* child */ ! (void) close(0); (void) dup(fdin[0]); (void) close(fdin[0]); (void) close(fdin[1]); ! (void) close(1); (void) dup(fdout[1]); (void) close(fdout[0]); (void) close(fdout[1]); if (compr[method].silent) ! (void) close(2); execvp(compr[method].argv[0], compr[method].argv); log_printf(r->server, "%s: could not execute `%s' (%s).", MODNAME, --- 2249,2265 ---- } switch (fork()) { case 0: /* child */ ! (void) close(STDIN_FILENO); (void) dup(fdin[0]); (void) close(fdin[0]); (void) close(fdin[1]); ! (void) close(STDOUT_FILENO) (void) dup(fdout[1]); (void) close(fdout[0]); (void) close(fdout[1]); if (compr[method].silent) ! (void) close(STDERR_FILENO); execvp(compr[method].argv[0], compr[method].argv); log_printf(r->server, "%s: could not execute `%s' (%s).", MODNAME,