[PHP-CVS] cvs: php-src(PHP_5_3) /sapi/litespeed lsapilib.c
gwang Fri Feb 27 23:33:01 2009 UTC Modified files: (Branch: PHP_5_3) /php-src/sapi/litespeed lsapilib.c Log: make STDOUT function as STDERR, in case any module call print() http://cvs.php.net/viewvc.cgi/php-src/sapi/litespeed/lsapilib.c?r1=1.5.2.5r2=1.5.2.6diff_format=u Index: php-src/sapi/litespeed/lsapilib.c diff -u php-src/sapi/litespeed/lsapilib.c:1.5.2.5 php-src/sapi/litespeed/lsapilib.c:1.5.2.6 --- php-src/sapi/litespeed/lsapilib.c:1.5.2.5 Sun Sep 21 02:38:32 2008 +++ php-src/sapi/litespeed/lsapilib.c Fri Feb 27 23:33:01 2009 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: lsapilib.c,v 1.5.2.5 2008/09/21 02:38:32 gwang Exp $ */ +/* $Id: lsapilib.c,v 1.5.2.6 2009/02/27 23:33:01 gwang Exp $ */ /* Copyright (c) 2007, Lite Speed Technologies Inc. @@ -581,6 +581,9 @@ #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; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src(PHP_5_3) /sapi/litespeed lsapilib.c
Hi 2009/2/28 George Wang gw...@php.net: gwang Fri Feb 27 23:33:01 2009 UTC Modified files: (Branch: PHP_5_3) /php-src/sapi/litespeed lsapilib.c Log: make STDOUT function as STDERR, in case any module call print() http://cvs.php.net/viewvc.cgi/php-src/sapi/litespeed/lsapilib.c?r1=1.5.2.5r2=1.5.2.6diff_format=u Index: php-src/sapi/litespeed/lsapilib.c diff -u php-src/sapi/litespeed/lsapilib.c:1.5.2.5 php-src/sapi/litespeed/lsapilib.c:1.5.2.6 --- php-src/sapi/litespeed/lsapilib.c:1.5.2.5 Sun Sep 21 02:38:32 2008 +++ php-src/sapi/litespeed/lsapilib.c Fri Feb 27 23:33:01 2009 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: lsapilib.c,v 1.5.2.5 2008/09/21 02:38:32 gwang Exp $ */ +/* $Id: lsapilib.c,v 1.5.2.6 2009/02/27 23:33:01 gwang Exp $ */ /* Copyright (c) 2007, Lite Speed Technologies Inc. @@ -581,6 +581,9 @@ #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; Shouldn't this change not be MFB to HEAD? -- Kalle Sommer Nielsen ka...@php.net -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_3) /sapi/litespeed lsapilib.c
gwang Sun Sep 21 02:34:08 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/sapi/litespeed lsapilib.c Log: disable core dump by default http://cvs.php.net/viewvc.cgi/php-src/sapi/litespeed/lsapilib.c?r1=1.5.2.3r2=1.5.2.4diff_format=u Index: php-src/sapi/litespeed/lsapilib.c diff -u php-src/sapi/litespeed/lsapilib.c:1.5.2.3 php-src/sapi/litespeed/lsapilib.c:1.5.2.4 --- php-src/sapi/litespeed/lsapilib.c:1.5.2.3 Tue Aug 26 22:05:17 2008 +++ php-src/sapi/litespeed/lsapilib.c Sun Sep 21 02:34:08 2008 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: lsapilib.c,v 1.5.2.3 2008/08/26 22:05:17 gwang Exp $ */ +/* $Id: lsapilib.c,v 1.5.2.4 2008/09/21 02:34:08 gwang Exp $ */ /* Copyright (c) 2007, Lite Speed Technologies Inc. @@ -66,7 +66,9 @@ #include stdio.h #include string.h #include sys/mman.h +#include sys/resource.h #include sys/socket.h +#include sys/time.h #include sys/uio.h #include sys/wait.h #include time.h @@ -2120,7 +2122,16 @@ if ( p ) { avoidFork = atoi( p ); } - + +#if defined( RLIMIT_CORE ) +p = getenv( LSAPI_ALLOW_CORE_DUMP ); +if ( !p ) +{ +struct rlimit limit = { 0, 0 }; +setrlimit( RLIMIT_CORE, limit ); +} +#endif + p = getenv( LSAPI_MAX_IDLE ); if ( p ) { n = atoi( p ); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_3) /sapi/litespeed lsapilib.c
gwang Sun Sep 21 02:38:32 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/sapi/litespeed lsapilib.c Log: http://cvs.php.net/viewvc.cgi/php-src/sapi/litespeed/lsapilib.c?r1=1.5.2.4r2=1.5.2.5diff_format=u Index: php-src/sapi/litespeed/lsapilib.c diff -u php-src/sapi/litespeed/lsapilib.c:1.5.2.4 php-src/sapi/litespeed/lsapilib.c:1.5.2.5 --- php-src/sapi/litespeed/lsapilib.c:1.5.2.4 Sun Sep 21 02:34:08 2008 +++ php-src/sapi/litespeed/lsapilib.c Sun Sep 21 02:38:32 2008 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: lsapilib.c,v 1.5.2.4 2008/09/21 02:34:08 gwang Exp $ */ +/* $Id: lsapilib.c,v 1.5.2.5 2008/09/21 02:38:32 gwang Exp $ */ /* Copyright (c) 2007, Lite Speed Technologies Inc. @@ -2125,8 +2125,7 @@ #if defined( RLIMIT_CORE ) p = getenv( LSAPI_ALLOW_CORE_DUMP ); -if ( !p ) -{ +if ( !p ) { struct rlimit limit = { 0, 0 }; setrlimit( RLIMIT_CORE, limit ); } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php