[Date Prev][Date Next]
Re: (ITS#6038) Write slapadd progress meter to stdout
- To: openldap-its@OpenLDAP.org
- Subject: Re: (ITS#6038) Write slapadd progress meter to stdout
- From: email@example.com
- Date: Fri, 27 Mar 2009 00:08:12 GMT
- Auto-submitted: auto-generated (OpenLDAP-ITS)
Hallvard B Furuseth wrote:
> firstname.lastname@example.org writes:
>> Just redirect stdin, and the meter will automatically turn itself off.
> It was stderr, not stdin - which after all can be the ldif.
> Stdout is better.
No, you misunderstand.
Redirecting stderr (or stdout) merely sends the progress info to that
destination. Piping input on stdin will turn it off, so there's no progress
info to redirect.
Writing progress to stderr is the correct thing to do, because it's transient
info that isn't meant to be saved. Checking whether stdout is redirected or
not is fine, but writing progress info to stdout is not.
-- Howard Chu
CTO, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc/
Chief Architect, OpenLDAP http://www.openldap.org/project/