Skip to content

Commit

Permalink
Use _exit() in fatal cases SERVER-5566
Browse files Browse the repository at this point in the history
  • Loading branch information
RedBeard0531 committed Apr 24, 2012
1 parent fff16be commit 5897f03
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/mongo/db/db.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1130,7 +1130,7 @@ namespace mongo {
rawOut( oss.str() );

// Don't go through normal shutdown procedure. It may make things worse.
::exit(EXIT_ABRUPT);
::_exit(EXIT_ABRUPT);

}

Expand Down Expand Up @@ -1171,7 +1171,7 @@ namespace mongo {
void my_new_handler() {
rawOut( "out of memory, printing stack and exiting:" );
printStackTrace();
::exit(EXIT_ABRUPT);
::_exit(EXIT_ABRUPT);
}

void setupSignals_ignoreHelper( int signal ) {}
Expand Down
2 changes: 1 addition & 1 deletion src/mongo/s/server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ namespace mongo {
void my_new_handler() {
rawOut( "out of memory, printing stack and exiting:" );
printStackTrace();
::exit(EXIT_ABRUPT);
::_exit(EXIT_ABRUPT);
}

void setupSignals( bool inFork ) {
Expand Down
2 changes: 1 addition & 1 deletion src/mongo/util/signal_handlers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ namespace mongo {
formattedWrite( fd , "===\n" );
}

::exit( EXIT_ABRUPT );
::_exit( EXIT_ABRUPT );
}

} // namespace mongo

0 comments on commit 5897f03

Please sign in to comment.