aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristophe Lyon <christophe.lyon@linaro.org>2018-09-28 08:26:02 +0000
committerJacob Bachmeyer <jcb62281+dev@gmail.com>2020-06-15 21:53:48 -0500
commitc0721121e0268de2a0604974b5e93c41b7cf1024 (patch)
treea2b84673c40912e7761f60f930e2b65d83db7db3
parentf3bfd00a619fa23078e7fddf2de4bc537a8ca0c4 (diff)
Combine remote stderr into remote stdout
* lib/ssh.exp (ssh_exec): Redirect stderr to stdout on the remote machine, to avoid race conditions.
-rw-r--r--lib/ssh.exp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ssh.exp b/lib/ssh.exp
index a72f794..3c7b840 100644
--- a/lib/ssh.exp
+++ b/lib/ssh.exp
@@ -171,7 +171,7 @@ proc ssh_exec { boardname program pargs inp outp } {
# We use && here, as otherwise the echo always works, which makes it look
# like execution succeeded when in reality it failed.
- set ret [local_exec "$SSH $ssh_useropts $ssh_user$hostname sh -c '$program $pargs && echo XYZ\\\${?}ZYX \\; rm -f $program'" $inp $outp $timeout]
+ set ret [local_exec "$SSH $ssh_useropts $ssh_user$hostname sh -c '$program $pargs 2>&1 && echo XYZ\\\${?}ZYX \\; rm -f $program'" $inp $outp $timeout]
set status [lindex $ret 0]
set output [lindex $ret 1]