1
0
Fork 0

adds disable_on_crash support for win32

git-svn-id: svn://svn.lighttpd.net/xcache/trunk@1106 c26eb9a1-5813-0410-bd6c-c2e55f420ca7
3.0
Xuefer 2012-08-01 16:54:51 +00:00
parent 68d982abe3
commit 711cc26f1f
4 changed files with 12 additions and 4 deletions

1
NEWS
View File

@ -8,6 +8,7 @@
* adds an diagnosis module to give advise @ htdocs
* adds warning for misconfiguration @ startup
* auto disable caching on crash @ runtime
* cache can be enabled/disabled manually
2.0.1 2012-07-14
========

View File

@ -48,10 +48,11 @@ xcache.readonly_protection = Off
xcache.mmap_path = "/dev/zero"
; 仅用于 *nix 系统
; 设置为空(禁用) 或者类似 "/tmp/phpcore/"
; 注意该目录应该能被 php 写入文件 (跟 open_basedir 无关)
xcache.coredump_directory = ""
; disable cache after crash
xcache.disable_on_crash = Off
; 启用实验性功能 (如果有)
xcache.experimental = Off

View File

@ -416,6 +416,7 @@ static MINIDUMPWRITEDUMP dbghelp_MiniDumpWriteDump = NULL;
static LONG WINAPI miniDumperFilter(struct _EXCEPTION_POINTERS *pExceptionInfo) /* {{{ */
{
HANDLE fileHandle;
LONG ret = EXCEPTION_CONTINUE_SEARCH;
SetUnhandledExceptionFilter(oldFilter);
@ -435,7 +436,7 @@ static LONG WINAPI miniDumperFilter(struct _EXCEPTION_POINTERS *pExceptionInfo)
CloseHandle(fileHandle);
if (ok) {
zend_error(E_ERROR, "Saved dump file to '%s'", crash_dumpPath);
return EXCEPTION_EXECUTE_HANDLER;
ret = EXCEPTION_EXECUTE_HANDLER;
}
else {
zend_error(E_ERROR, "Failed to save dump file to '%s' (error %d)", crash_dumpPath, GetLastError());
@ -445,7 +446,12 @@ static LONG WINAPI miniDumperFilter(struct _EXCEPTION_POINTERS *pExceptionInfo)
zend_error(E_ERROR, "Failed to create dump file '%s' (error %d)", crash_dumpPath, GetLastError());
}
return EXCEPTION_CONTINUE_SEARCH;
if (xc_disable_on_crash) {
xc_disable_on_crash = 0;
xc_cacher_disable();
}
return ret;
}
/* }}} */

View File

@ -51,7 +51,7 @@ xcache.mmap_path = "/dev/zero"
; leave it blank(disabled) or "/tmp/phpcore/"
; make sure it's writable by php (open_basedir is not checked)
xcache.coredump_directory = ""
; disable cache after crash until restart. (non-Win32 only)
; disable cache after crash
xcache.disable_on_crash = Off
; enable experimental documented features for each release if available