common: improve redirect_output() error handling
authorBrian Norris <banorris@uci.edu>
Thu, 4 Apr 2013 19:55:33 +0000 (12:55 -0700)
committerBrian Norris <banorris@uci.edu>
Thu, 4 Apr 2013 20:03:14 +0000 (13:03 -0700)
commit964ae5c3c62fc383c53e90b20f32ba17b7b616ab
tree3f7d47b9f329b4039b801f47660b8b6ee8ebbbac
parente52837077816345a2afa94b42195992a5871824c
common: improve redirect_output() error handling

Check the return code and errno results of all system/library calls.
Also delete the extraneous 'fd' variable and use the appropriate
STDOUT_FILENO macro instead of fileno(stdout).
common.cc