From 22badf88b0b659574029207a7ca0519e01a0c787 Mon Sep 17 00:00:00 2001 From: George Wang Date: Fri, 27 Feb 2009 23:33:01 +0000 Subject: [PATCH] make STDOUT function as STDERR, in case any module call print() --- sapi/litespeed/lsapilib.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sapi/litespeed/lsapilib.c b/sapi/litespeed/lsapilib.c index 9084a850b2..3c3373ac7e 100644 --- a/sapi/litespeed/lsapilib.c +++ b/sapi/litespeed/lsapilib.c @@ -581,6 +581,9 @@ int LSAPI_Init(void) #if defined(SIGXFSZ) && defined(SIG_IGN) signal(SIGXFSZ, SIG_IGN); #endif + /* let STDOUT function as STDERR, + just in case writing to STDOUT directly */ + dup2( 2, 1 ); if ( LSAPI_InitRequest( &g_req, LSAPI_SOCK_FILENO ) == -1 ) { return -1; -- 2.50.1