1
0
Fork 0

fix version string in core dump filename

git-svn-id: svn://svn.lighttpd.net/xcache/trunk@919 c26eb9a1-5813-0410-bd6c-c2e55f420ca7
3.0
Xuefer 11 years ago
parent e650948e58
commit 6ae47f3a02

@ -3406,6 +3406,7 @@ static void xcache_init_crash_handler() /* {{{ */
look next to the EXE first, as the one in System32 might be old
(e.g. Windows 2000) */
char dbghelpPath[_MAX_PATH];
const char *phpVersion;
if (GetModuleFileName(NULL, dbghelpPath, _MAX_PATH)) {
char *slash = strchr(dbghelpPath, '\\');
@ -3430,7 +3431,14 @@ static void xcache_init_crash_handler() /* {{{ */
return;
}
sprintf(crash_dumpPath, "%s\\php-%s-xcache-%s-%lu.dmp", xc_coredump_dir, PHP_VERSION, XCACHE_VERSION, (unsigned long) GetCurrentProcessId());
phpVersion = zend_get_module_version("core");
if (!phpVersion) {
phpVersion = zend_get_module_version("standard");
if (!phpVersion) {
phpVersion = "unknown";
}
}
sprintf(crash_dumpPath, "%s\\php-%s-xcache-%s-%lu.dmp", xc_coredump_dir, phpVersion, XCACHE_VERSION, (unsigned long) GetCurrentProcessId());
oldFilter = SetUnhandledExceptionFilter(&miniDumperFilter);
}

Loading…
Cancel
Save