adds disable_on_crash support for win32
git-svn-id: svn://svn.lighttpd.net/xcache/trunk@1106 c26eb9a1-5813-0410-bd6c-c2e55f420ca73.0
parent
68d982abe3
commit
711cc26f1f
1
NEWS
1
NEWS
|
@ -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
|
||||
========
|
||||
|
|
|
@ -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
|
||||
|
|
10
xcache.c
10
xcache.c
|
@ -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;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue