one more getpid() fix for windows
This commit is contained in:
@@ -1140,7 +1140,12 @@ namespace aux {
|
||||
error_code ec;
|
||||
char filename[100];
|
||||
create_directory("session_stats", ec);
|
||||
snprintf(filename, sizeof(filename), "session_stats/%d.%04d.log", int(getpid()), m_log_seq);
|
||||
#ifdef TORRENT_WINDOWS
|
||||
const int pid = GetCurrentProcessId();
|
||||
#else
|
||||
const int pid = getpid();
|
||||
#endif
|
||||
snprintf(filename, sizeof(filename), "session_stats/%d.%04d.log", pid, m_log_seq);
|
||||
m_stats_logger = fopen(filename, "w+");
|
||||
if (m_stats_logger == 0)
|
||||
{
|
||||
|
@@ -44,7 +44,8 @@ def style_output(o):
|
||||
ret = ''
|
||||
subtle = False
|
||||
for l in o.split('\n'):
|
||||
if 'TEST_CHECK' in l or 'TEST_EQUAL_ERROR' in l or l.startswith('EXIT STATUS: '):
|
||||
if 'TEST_CHECK' in l or 'TEST_EQUAL_ERROR' in l or l.startswith('EXIT STATUS: ') or \
|
||||
l.endswith(' second time limit exceeded'):
|
||||
ret += '<span class="test-error">%s</span>\n' % l
|
||||
elif '**passed**' in l:
|
||||
ret += '<span class="test-pass">%s</span>\n' % l
|
||||
@@ -250,7 +251,7 @@ for d in details:
|
||||
html = open(os.path.join('logs', '%d.html' % details_id), 'w+')
|
||||
print >>html, '''<html><head><title>%s - %s</title><style type="text/css">
|
||||
.compile-error { color: #f13; font-weight: bold; }
|
||||
.compile-warning { color: #cb0; }
|
||||
.compile-warning { font-weight: bold; color: black; }
|
||||
.test-error { color: #f13; font-weight: bold; }
|
||||
.test-pass { color: #1c2; font-weight: bold; }
|
||||
.subtle { color: #ccc; }
|
||||
|
Reference in New Issue
Block a user