diff options
| author | jdennis <jdennis@c9f7a03b-bd48-0410-a16d-cbbf54688b0b> | 2010-11-19 20:37:14 +0000 |
|---|---|---|
| committer | jdennis <jdennis@c9f7a03b-bd48-0410-a16d-cbbf54688b0b> | 2010-11-19 20:37:14 +0000 |
| commit | 8d084460bd636481359efd07aba9bfa858611336 (patch) | |
| tree | fd270e8d943fbc148713bdd6279a8f6cfdb5a56f /pki/base/silent/src/http/HTTPClient.java | |
| parent | 391e47d2b0006d49395b1906a1f6f469e874dfa2 (diff) | |
Add run_command() utility
Many of the existing functions were using the backtic operator to run
a shell command and then tested if the length returned string was zero
to determine success. This is incorrect for two reasons:
1) the backtick operator discards stderr and returns only stdout, thus
if the command did generate a message because of an error it would
likely do so on stderr not stdout and thus the test for output is
performed on the wrong stream.
2) the presence or absense of output is not the proper way to
determine if a shell command succeeded, one needs to test the exit
status of the command.
This patch adds the run_command() function which will be utilized in
subsequent patches.
git-svn-id: svn+ssh://svn.fedorahosted.org/svn/pki/trunk@1539 c9f7a03b-bd48-0410-a16d-cbbf54688b0b
Diffstat (limited to 'pki/base/silent/src/http/HTTPClient.java')
0 files changed, 0 insertions, 0 deletions
