summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron <aaron@10gen.com>2009-04-03 11:20:57 -0400
committerAaron <aaron@10gen.com>2009-04-03 11:20:57 -0400
commit05a8521a684e8554a4c1f3531ee1fc0132f00d63 (patch)
treea481795461340f2b83ae2416af8b2e7e1a2acd4e
parent8cd7cde9258e28c4954eb0c023718ace9dac5e6b (diff)
downloadmongo-05a8521a684e8554a4c1f3531ee1fc0132f00d63.tar.gz
waitpid return val debug
-rw-r--r--shell/ShellUtils.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/shell/ShellUtils.cpp b/shell/ShellUtils.cpp
index 0213aa3a4d4..fb876f1cf05 100644
--- a/shell/ShellUtils.cpp
+++ b/shell/ShellUtils.cpp
@@ -481,7 +481,9 @@ void killDb( int port, int signal ) {
kill( pid, SIGKILL );
}
int temp;
- if( waitpid( pid, &temp, WNOHANG ) == pid )
+ int ret = waitpid( pid, &temp, WNOHANG );
+ cout << "waitpid returns: " << ret << ", errno: " << errno << ", strerror: " << strerror( errno ) << endl;
+ if ( ret == pid )
break;
cout << "waiting for process on port " << port << " to terminate" << endl;
sleepms( 1000 );