diff --git a/src/engine/execnt.c b/src/engine/execnt.c index 2f213bf5e..b456791db 100644 --- a/src/engine/execnt.c +++ b/src/engine/execnt.c @@ -112,6 +112,9 @@ static void register_wait( int job_id ); */ #define MAX_RAW_COMMAND_LENGTH 32766 + /* Communication buffers size */ +#define IO_BUFFER_SIZE ( 64 * 1024 ) + /* We hold handles for pipes used to communicate with child processes in two * element arrays indexed as follows. */ @@ -497,14 +500,14 @@ static void invoke_cmd( char const * const command, int const slot ) /* Create pipes for communicating with the child process. */ if ( !CreatePipe( &cmdtab[ slot ].pipe_out[ EXECCMD_PIPE_READ ], - &cmdtab[ slot ].pipe_out[ EXECCMD_PIPE_WRITE ], &sa, 0 ) ) + &cmdtab[ slot ].pipe_out[ EXECCMD_PIPE_WRITE ], &sa, IO_BUFFER_SIZE ) ) { reportWindowsError( "CreatePipe", slot ); return; } if ( globs.pipe_action && !CreatePipe( &cmdtab[ slot ].pipe_err[ EXECCMD_PIPE_READ ], &cmdtab[ slot ].pipe_err[ EXECCMD_PIPE_WRITE ], - &sa, 0 ) ) + &sa, IO_BUFFER_SIZE ) ) { reportWindowsError( "CreatePipe", slot ); return; @@ -749,8 +752,6 @@ static void record_times( HANDLE const process, timing_info * const time ) } -#define IO_BUFFER_SIZE ( 16 * 1024 ) - static char ioBuffer[ IO_BUFFER_SIZE + 1 ]; #define FORWARD_PIPE_NONE 0