diff options
author | George Wang <gwang@php.net> | 2008-09-21 02:34:08 +0000 |
---|---|---|
committer | George Wang <gwang@php.net> | 2008-09-21 02:34:08 +0000 |
commit | 0f4f00e3ae7bdc0ef755412de1118c616cd8504d (patch) | |
tree | e0f88361bea6f25510c35a191493f130858719aa /sapi | |
parent | f6b2e89ea68ebe1d68b759a1568f331a70a97938 (diff) | |
download | php-git-0f4f00e3ae7bdc0ef755412de1118c616cd8504d.tar.gz |
disable core dump by default
Diffstat (limited to 'sapi')
-rw-r--r-- | sapi/litespeed/lsapilib.c | 13 |
1 files changed, 12 insertions, 1 deletions
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 <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 @@ 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 ); |