mirror of
https://github.com/mongodb/mongo.git
synced 2024-12-01 09:32:32 +01:00
Merge branch 'master' of github.com:mongodb/mongo
This commit is contained in:
commit
7ba50bffab
@ -150,6 +150,7 @@ namespace mongo {
|
||||
_start = _checkpoint = curTimeMicros64();
|
||||
_active = false;
|
||||
_reset();
|
||||
_op = 0;
|
||||
// These addresses should never be written to again. The zeroes are
|
||||
// placed here as a precaution because currentOp may be accessed
|
||||
// without the db mutex.
|
||||
|
@ -6,13 +6,13 @@ if ( typeof( _startMongoProgram ) == "undefined" ){
|
||||
print( "no fork support" );
|
||||
}
|
||||
else {
|
||||
spawn = startMongoProgramNoConnect( "mongo", "--port", myPort(), "--eval", "sleep( 2000 ); db.getCollection( \"" + baseName + "\" ).save( {a:1} );" );
|
||||
spawn = startMongoProgramNoConnect( "mongo", "--port", myPort(), "--eval", "sleep( 2000 ); db.getCollection( '" + baseName + "' ).save( {a:1} );" );
|
||||
|
||||
assert.soon( function() { return 1 == t.count(); } );
|
||||
|
||||
stopMongoProgramByPid( spawn );
|
||||
|
||||
spawn = startMongoProgramNoConnect( "mongo", "--port", myPort(), "--eval", "print( \"I am a shell\" );" );
|
||||
spawn = startMongoProgramNoConnect( "mongo", "--port", myPort(), "--eval", "print( 'I am a shell' );" );
|
||||
|
||||
spawn = startMongoProgramNoConnect( "mongo", "--port", myPort() );
|
||||
|
||||
@ -21,4 +21,4 @@ else {
|
||||
stopMongoProgramByPid( spawn );
|
||||
|
||||
// all these shells should be killed
|
||||
}
|
||||
}
|
||||
|
@ -427,9 +427,9 @@ namespace mongo {
|
||||
|
||||
inline void kill_wrapper(pid_t pid, int sig, int port){
|
||||
#ifdef _WIN32
|
||||
if (sig == SIGKILL){
|
||||
if (sig == SIGKILL || port == 0){
|
||||
assert( handles.count(pid) );
|
||||
assert( ! TerminateProcess(handles[pid], 1) );
|
||||
TerminateProcess(handles[pid], 1); // returns failure for "zombie" processes.
|
||||
}else{
|
||||
DBClientConnection conn;
|
||||
conn.connect("127.0.0.1:" + BSONObjBuilder::numStr(port));
|
||||
|
Loading…
Reference in New Issue
Block a user