--- trunk/icecream/client/main.cpp 2006/06/19 13:18:26 552930 +++ trunk/icecream/client/main.cpp 2006/07/05 16:47:26 558598 @@ -114,7 +114,7 @@ static string read_output( const char *command ) { - FILE *f = popen( command, "rt" ); + FILE *f = popen( command, "r" ); string output; if ( !f ) { log_error() << "no pipe " << strerror( errno ) << endl; @@ -126,8 +126,10 @@ buffer[bytes] = 0; output += buffer; } + pclose( f ); - return output; + // get rid of the endline + return output.substr(0, output.length()-1); } static int create_native()