From b6a3e52aec69146e930d85b84a81b1e059f2ffe5 Mon Sep 17 00:00:00 2001 From: Christophe Lyon Date: Fri, 28 Sep 2018 08:26:02 +0000 Subject: 2018-09-28 Christophe Lyon * lib/ssh.exp (ssh_exec): Redirect stderr to stdout on the remote machine, to avoid race conditions. Change-Id: Ie0613a85fa990484fda41b13738025edf7477a62 --- lib/ssh.exp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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] -- cgit v1.2.3