diff options
author | Dwight <dmerriman@gmail.com> | 2008-04-17 10:12:32 -0400 |
---|---|---|
committer | Dwight <dmerriman@gmail.com> | 2008-04-17 10:12:32 -0400 |
commit | eb204a454cfc4c9ae427b48cfd01fe2a4921a59e (patch) | |
tree | ae6c353d376330bca42cae8177900da6d2c1bf78 | |
parent | 84fd0d5390c5432eebfe27ea1c17556af02fcd87 (diff) | |
parent | f3a45cf3a1d29530bf5ccb7d6181a2e1e7c4a667 (diff) | |
download | mongo-eb204a454cfc4c9ae427b48cfd01fe2a4921a59e.tar.gz |
Merge branch 'master' of ssh://git.10gen.com/data/gitroot/p
-rw-r--r-- | db/db.cpp | 8 | ||||
-rw-r--r-- | stdafx.h | 1 |
2 files changed, 8 insertions, 1 deletions
diff --git a/db/db.cpp b/db/db.cpp index 52d77deddaf..3d693a2cbdf 100644 --- a/db/db.cpp +++ b/db/db.cpp @@ -432,7 +432,7 @@ void connThread() cout << curTimeMillis() % 10000 << " end msg" << endl;
dbMsgPort.shutdown();
sleepmillis(500);
- exit(1);
+ exit(EXIT_SUCCESS);
}
}
else if( m.data->operation == dbQuery ) {
@@ -569,8 +569,14 @@ void initAndListen(int listenPort, const char *dbPath) { listen(listenPort);
}
+void sigHandler( int signal ) {
+ psignal( signal, "Signal Received : ");
+} /*handler*/
+
int main(int argc, char* argv[], char *envp[] )
{
+ signal(SIGPIPE, sigHandler);
+
srand(curTimeMillis());
if( argc >= 2 ) {
@@ -39,6 +39,7 @@ void wasserted(const char *msg, const char *file, unsigned line); #include <stdio.h>
#include <sstream>
+#include <signal.h>
typedef char _TCHAR;
|