From: Howard Chu Date: Fri, 27 Mar 2009 11:07:42 +0000 (+0000) Subject: ITS#6038 revert prev commits, ITS rejected X-Git-Tag: ACLCHECK_0~652 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=94ab6a31b26f27f385173dc35258915f1aeebd77;p=openldap ITS#6038 revert prev commits, ITS rejected --- diff --git a/libraries/liblutil/meter.c b/libraries/liblutil/meter.c index 15e6832bb6..0bbbdc0307 100644 --- a/libraries/liblutil/meter.c +++ b/libraries/liblutil/meter.c @@ -214,7 +214,7 @@ text_open (void ** display_datap) data->buffer_length = default_buffer_length; data->buffer = calloc( 1, default_buffer_length ); assert( data->buffer != NULL ); - data->output = stdout; + data->output = stderr; *display_datap = data; return 0; } @@ -314,7 +314,6 @@ text_update ( (void) fprintf( data->output, "\r%-79s", data->buffer ); - (void) fflush( data->output ); data->need_eol = 1; return 0; } diff --git a/servers/slapd/slapadd.c b/servers/slapd/slapadd.c index 38d5b89253..a6cf3a2e21 100644 --- a/servers/slapd/slapadd.c +++ b/servers/slapd/slapadd.c @@ -76,7 +76,7 @@ slapadd( int argc, char **argv ) /* default "000" */ csnsid = 0; - if ( isatty (1) ) enable_meter = 1; + if ( isatty (2) ) enable_meter = 1; slap_tool_init( progname, SLAPADD, argc, argv ); memset( &opbuf, 0, sizeof(opbuf) ); @@ -506,7 +506,7 @@ slapadd( int argc, char **argv ) if ( !dryrun ) { if ( enable_meter ) { - fprintf( stdout, "Closing DB..." ); + fprintf( stderr, "Closing DB..." ); } if( be->be_entry_close( be ) ) { rc = EXIT_FAILURE; @@ -516,7 +516,7 @@ slapadd( int argc, char **argv ) be->be_sync( be ); } if ( enable_meter ) { - fprintf( stdout, "\n" ); + fprintf( stderr, "\n" ); } }