From: George Wang Date: Fri, 27 Feb 2009 23:33:01 +0000 (+0000) Subject: make STDOUT function as STDERR, in case any module call print() X-Git-Tag: RELEASE_1_3_5~67 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=22badf88b0b659574029207a7ca0519e01a0c787;p=php make STDOUT function as STDERR, in case any module call print() --- 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;