summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorDavid Young <dyoung@hdfgroup.org>2020-04-28 13:40:58 (GMT)
committerDavid Young <dyoung@hdfgroup.org>2020-04-28 13:40:58 (GMT)
commita204a184aadb7ac466ef83cc51a77e7bac82c40c (patch)
tree3fac6ef957701db0aea8f6c596b626ab9c517700 /test
parent4e48041a136beef974097a7e4683b308097af84e (diff)
downloadhdf5-a204a184aadb7ac466ef83cc51a77e7bac82c40c.zip
hdf5-a204a184aadb7ac466ef83cc51a77e7bac82c40c.tar.gz
hdf5-a204a184aadb7ac466ef83cc51a77e7bac82c40c.tar.bz2
Let catch_out_err_and_rc() callers redirect the standard input and
output streams using STDIN_PATH and STDOUT_PATH. I will use that for the zoo reader and writer. Move redirection of standard error output to the standard output stream outside of the curly braces, since usually I want to save the `echo` and `wait` output, too, and it makes the redirection of the supervised program a little easier to follow, I think.
Diffstat (limited to 'test')
-rw-r--r--test/supervise.subr4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/supervise.subr b/test/supervise.subr
index 2388b17..d2b0395 100644
--- a/test/supervise.subr
+++ b/test/supervise.subr
@@ -17,11 +17,11 @@ catch_out_err_and_rc()
outbase=$1
shift
{
- "$@" 2>&1 &
+ "$@" < ${STDIN_PATH:-/dev/stdin} > ${STDOUT_PATH:-/dev/stdout} &
echo $! > ${outbase}.pid
wait $(cat ${outbase}.pid)
echo $? > ${outbase}.rc
- } | tee ${outbase}.out
+ } 2>&1 | tee ${outbase}.out
}
#catch_out_err_and_rc xxlsxx ls smiles &