Skip to content

Commit 36d3433

Browse files
committed
remove logging about mongo process management
1 parent e39393b commit 36d3433

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

shell/ShellUtils.cpp

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,6 @@ bool ExecuteString(Handle<v8::String> source, Handle<v8::Value> name,
179179
}
180180

181181
void sleepms( int ms ) {
182-
cout << "TEMP sleeping " << ms << "ms" << endl;
183182
boost::xtime xt;
184183
boost::xtime_get(&xt, boost::TIME_UTC);
185184
xt.sec += ( ms / 1000 );
@@ -478,24 +477,23 @@ void killDb( int port, int signal ) {
478477
int i = 0;
479478
for( ; i < 65; ++i ) {
480479
if ( i == 5 ) {
481-
cout << "process on port " << port << "not terminated, sending sigkill" << endl;
480+
cout << "process on port " << port << ", with pid " << pid << " not terminated, sending sigkill" << endl;
482481
assert( 0 == kill( pid, SIGKILL ) );
483482
}
484483
int temp;
485484
int ret = waitpid( pid, &temp, WNOHANG );
486-
cout << "waitpid returns: " << ret << ", errno: " << errno << ", strerror: " << strerror( errno ) << endl;
487485
if ( ret == pid )
488486
break;
489-
cout << "waiting for process on port " << port << " to terminate" << endl;
490487
sleepms( 1000 );
491488
}
492-
if ( i == 65 )
489+
if ( i == 65 ) {
490+
cout << "failed to terminate process on port " << port << ", with pid " << pid << endl;
493491
assert( "Failed to terminate process" == 0 );
492+
}
494493

495494
close( dbs[ port ].second );
496495
dbs.erase( port );
497496
if ( i > 4 || signal == SIGKILL ) {
498-
cout << "sleeping after sigkill" << endl;
499497
sleepms( 4000 ); // allow operating system to reclaim resources
500498
}
501499
}

0 commit comments

Comments
 (0)