Fix for STDOUT and STDERR handling
Status: Beta
Brought to you by:
mtp22
The use of 'select STDOUT;' and 'select STDERR;' cause
implicit 'print' descriptors to use the value of the
last 'select' statement.
I noticed this when I tried to re-direct STDOUT to a
file from the shell and the resulting file was empty
but all the output went to the terminal.
This patch hard-wires all 'print' statements to be
either STDOUT or STDERR depending upon the following:
1. Prompts for input are sent to STDERR.
2. dsh output from nodes is sent to STDOUT (even if the
node's output occurs on STDERR).
3. Usage is sent to STDERR.
4. dsh status/warning/errors are sent to STDERR.
Hope this helps!
dsh STDOUT descriptor patch