]> granicus.if.org Git - php/commitdiff
make STDOUT function as STDERR, in case any module call print()
authorGeorge Wang <gwang@php.net>
Fri, 27 Feb 2009 23:33:01 +0000 (23:33 +0000)
committerGeorge Wang <gwang@php.net>
Fri, 27 Feb 2009 23:33:01 +0000 (23:33 +0000)
sapi/litespeed/lsapilib.c

index 9084a850b28a1ce185c6c7d1c9bb495c398a1c84..3c3373ac7ebd957163d7923444466bcd4b259d9b 100644 (file)
@@ -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;