[Patch] Fix timeout override in remote_exec

Yvan Roux <[email protected]>
Newsgroups gmane.comp.sysutils.dejagnu.general
Message-ID <CAD57uCeZ_=AYkjgwJMtAUrKaZGiZs89JMS_XbViDEsAU_WDRnQ@mail.gmail.com>
Hi,

This patch fix the restoration of the original timeout value at the
end of remote_exec.

Cheers,
Yvan

 2016-03-03  Yvan Roux  <[email protected]>

        * lib/remote.exp (remote_exec):  Restore original timeout value.

_______________________________________________
DejaGnu mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/dejagnu
dj-fix-timeout-override.diff (text/plain, 667 B)
diff --git a/lib/remote.exp b/lib/remote.exp
index 1fd1010..7b984b9 100644
--- a/lib/remote.exp
+++ b/lib/remote.exp
@@ -310,13 +310,14 @@ proc remote_exec { hostname program args } {
 
     # Run it locally if appropriate.
     if { ![is_remote $hostname] } {
-	return [local_exec "$program $pargs" $inp $outp $timeout]
+	set result [local_exec "$program $pargs" $inp $outp $timeout]
     } else {
-	return [call_remote "" exec $hostname $program $pargs $inp $outp]
+	set result [call_remote "" exec $hostname $program $pargs $inp $outp]
     }
 
     # Restore timeout.
     set timeout $old_timeout
+    return $result
 }
 
 proc standard_exec { hostname args } {
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.