[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: small 'rmdir' bug on EL3 and EL4?

John Summerfield wrote:
Michael Schwendt wrote:

Which is useful, because when --help is printed as the result of a
syntax error (or changes in the options syntax of updated tools) you
see this output as error output in scripts (e.g. cron scripts) even
when stdout is deleted.

Generally, I don't like the help message being displayed in response to one of my errors. If it's a simple typo (most usual) then I don't need it, and if the help message is reasonable complete (as in rsync and rpm) then the original error message scrolls off the screen.

I note the mount command (assuming it's right to print the help text to an error) gets it right. "mount --help" goes to stdout. "mount -xy /mnt" goes to stderr.

Absolutely. If I type "rsync --xyzzy" it tells me that it's an unknown option (on stderr), but "rsync --help" gives several screens full of useful information. On the other hand, "openssl xyzzy" gives 27 lines of usage and, as you say, you get that normally in response to a typo and losing the actuall error message off the top of the screen is not helpful (especially since when you're switching from virtual console to virtual console the scrollback buffer is discarded).

stderr really is for errors, stdout is for information mostly (there are a few valid exceptions) and mixing the two really doesn't help anyone. rsync and "rm -v" get this right, openssl and "rmdir -v" get it wrong. Probably :-)

I'm just waiting now for the raft of bugs in bugzilla.redhat.com ...


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]