SERVER-1517 Heapcheck 'mongod' and 'mongos' only (fix core tests)
This commit is contained in:
@@ -545,9 +545,14 @@ namespace mongo {
|
||||
#if defined(HEAP_CHECKING)
|
||||
env[0] = "HEAPCHECK=normal";
|
||||
env[1] = NULL;
|
||||
|
||||
// Heap-check for mongod and mongos only. 'argv[0]' must be in the path format.
|
||||
if ( ( argv_[0].find("mongod") != string::npos) || ( argv_[0].find("mongos") != string::npos) ){
|
||||
execvpe( argv[ 0 ], const_cast<char**>(argv) , const_cast<char**>(env) );
|
||||
}
|
||||
#endif // HEAP_CHECKING
|
||||
|
||||
execve( argv[ 0 ], const_cast<char**>(argv), const_cast<char**>(env) );
|
||||
execvp( argv[ 0 ], const_cast<char**>(argv) );
|
||||
|
||||
cout << "Unable to start program " << argv[0] << ' ' << errnoWithDescription() << endl;
|
||||
::_Exit(-1);
|
||||
|
||||
Reference in New Issue
Block a user