diff --git a/shell/ShellUtils.cpp b/shell/ShellUtils.cpp index 7156b4678d8..740a539c296 100644 --- a/shell/ShellUtils.cpp +++ b/shell/ShellUtils.cpp @@ -438,6 +438,7 @@ public: if ( ret == 0 ) { if ( *last ) writeMongoProgramOutputLine( port_, last ); + close( pipe_ ); break; } if ( last != buf ) {