summaryrefslogtreecommitdiff
path: root/doc/examples.texi
diff options
context:
space:
mode:
authorArtyom V. Poptsov <poptsov.artyom@gmail.com>2015-02-22 17:07:39 +0300
committerArtyom V. Poptsov <poptsov.artyom@gmail.com>2015-02-22 17:07:39 +0300
commit133ba2a0a9e6436fdcef54faf34bfa86705d5d60 (patch)
tree78af616ceaeb0ccd7937db6871423ec44c223de2 /doc/examples.texi
parentdoc/examples.texi (Examples): Fix path to examples (diff)
downloadguile-ssh-133ba2a0a9e6436fdcef54faf34bfa86705d5d60.tar.gz
doc/examples.texi (Examples): Update
* doc/examples.texi (Examples): Use `channel-get-exit-status' in the client example.
Diffstat (limited to 'doc/examples.texi')
-rw-r--r--doc/examples.texi4
1 files changed, 4 insertions, 0 deletions
diff --git a/doc/examples.texi b/doc/examples.texi
index 579bc16..2f2ff64 100644
--- a/doc/examples.texi
+++ b/doc/examples.texi
@@ -66,6 +66,10 @@ the server.
;; Execute a command
(channel-request-exec channel "uname")
+ ;; Check the exit status of the command
+ (or (zero? (channel-get-exit-status channel))
+ ...) ; Handle error
+
;; Poll the channel for data
(let poll ((ready? #f))
(if ready?