From: George Wang Date: Sun, 21 Sep 2008 02:34:48 +0000 (+0000) Subject: disable core dump by default X-Git-Tag: BEFORE_HEAD_NS_CHANGE~348 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=babc62e9ea9a6b8f2f2dcd4518961db329583bf9;p=php disable core dump by default --- diff --git a/sapi/litespeed/lsapilib.c b/sapi/litespeed/lsapilib.c index 145ed0a973..9092533a5c 100644 --- a/sapi/litespeed/lsapilib.c +++ b/sapi/litespeed/lsapilib.c @@ -66,7 +66,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include #include +#include #include +#include #include #include #include @@ -2120,7 +2122,16 @@ void LSAPI_Init_Env_Parameters( fn_select_t fp ) 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 );