rse 98/07/27 07:58:20
Modified: src CHANGES src/main alloc.c Log: Fix Win32 part of ap_spawn_child() by providing a reasonable child_info structure instead of just NULL. This fixes at least the RewriteMap programs under Win32. Submitted by: Marco De Michele <[EMAIL PROTECTED]> Reviewed by: Ralf S. Engelschall PR: 2483 Revision Changes Path 1.989 +4 -0 apache-1.3/src/CHANGES Index: CHANGES =================================================================== RCS file: /export/home/cvs/apache-1.3/src/CHANGES,v retrieving revision 1.988 retrieving revision 1.989 diff -u -r1.988 -r1.989 --- CHANGES 1998/07/27 14:39:20 1.988 +++ CHANGES 1998/07/27 14:58:17 1.989 @@ -1,5 +1,9 @@ Changes with Apache 1.3.2 + *) Fix Win32 part of ap_spawn_child() by providing a reasonable child_info + structure instead of just NULL. This fixes at least the RewriteMap + programs under Win32. [Marco De Michele <[EMAIL PROTECTED]>] PR#2483 + *) Add workaround to top-level `configure' script for brain dead `echo' commands which interpet escape sequences per default. [Ralf S. Engelschall] PR#2654 1.97 +6 -1 apache-1.3/src/main/alloc.c Index: alloc.c =================================================================== RCS file: /export/home/cvs/apache-1.3/src/main/alloc.c,v retrieving revision 1.96 retrieving revision 1.97 diff -u -r1.96 -r1.97 --- alloc.c 1998/06/13 15:22:52 1.96 +++ alloc.c 1998/07/27 14:58:19 1.97 @@ -1850,6 +1850,7 @@ HANDLE thread_handle; int hStdIn, hStdOut, hStdErr; int old_priority; + child_info info; (void) ap_acquire_mutex(spawn_mutex); thread_handle = GetCurrentThread(); /* doesn't need to be closed */ @@ -1876,7 +1877,11 @@ close(err_fds[1]); } - pid = (*func) (data, NULL); + info.hPipeInputRead = GetStdHandle(STD_INPUT_HANDLE); + info.hPipeOutputWrite = GetStdHandle(STD_OUTPUT_HANDLE); + info.hPipeErrorWrite = GetStdHandle(STD_ERROR_HANDLE); + + pid = (*func) (data, &info); if (pid == -1) pid = 0; /* map Win32 error code onto Unix default */ if (!pid) {