summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authordwight <dwight@10gen.com>2011-04-18 18:44:38 -0400
committerdwight <dwight@10gen.com>2011-04-18 18:44:38 -0400
commit4f969e112abf5a30b0e2bfde170b0c868d79bde5 (patch)
treeeaccfa0745f6e9faaa52efd76e3043e35cd53fd9 /util
parent736733e95784d1344592e76e6d7921d59008827d (diff)
downloadmongo-4f969e112abf5a30b0e2bfde170b0c868d79bde5.tar.gz
trap segfaults and such and try to log them on windows
we also try to write a note to the windows event viewer
Diffstat (limited to 'util')
-rw-r--r--util/concurrency/race.h2
-rw-r--r--util/log.cpp6
-rw-r--r--util/log.h1
3 files changed, 3 insertions, 6 deletions
diff --git a/util/concurrency/race.h b/util/concurrency/race.h
index 0b8338c4333..9080124f27c 100644
--- a/util/concurrency/race.h
+++ b/util/concurrency/race.h
@@ -27,7 +27,7 @@ namespace mongo {
void fail() {
log() << "synchronization (race condition) failure" << endl;
printStackTrace();
- abort();
+ ::abort();
}
void enter() {
if( ++n != 1 ) fail();
diff --git a/util/log.cpp b/util/log.cpp
index eb7a848cabf..40cea136035 100644
--- a/util/log.cpp
+++ b/util/log.cpp
@@ -19,7 +19,6 @@
#include "pch.h"
#include "assert_util.h"
#include "assert.h"
-//#include "file.h"
#include <cmath>
using namespace std;
@@ -28,7 +27,7 @@ using namespace std;
#include <sys/file.h>
#endif
-#include "../db/jsobj.h"
+//#include "../db/jsobj.h"
namespace mongo {
@@ -84,7 +83,7 @@ namespace mongo {
if ( _file ) {
#ifdef _WIN32
- cout << "log rotation doesn't work on windows" << endl;
+ cout << "log rotation net yet supported on windows" << endl;
return;
#else
struct tm t;
@@ -135,4 +134,3 @@ namespace mongo {
FILE* Logstream::logfile = stdout;
}
-
diff --git a/util/log.h b/util/log.h
index de8969315f4..53fc0de7987 100644
--- a/util/log.h
+++ b/util/log.h
@@ -431,7 +431,6 @@ namespace mongo {
string errnoWithPrefix( const char * prefix );
void Logstream::logLockless( const StringData& s ) {
-
if ( s.size() == 0 )
return;