summaryrefslogtreecommitdiff
path: root/modules/ssh/dist
diff options
context:
space:
mode:
authorArtyom V. Poptsov <poptsov.artyom@gmail.com>2015-12-06 12:39:17 +0300
committerArtyom V. Poptsov <poptsov.artyom@gmail.com>2015-12-06 12:39:17 +0300
commit35d44fe3114eb796bd432215111adbf1e5aef05e (patch)
tree2c43a24107750eb877012c7a52d7607204d5cae6 /modules/ssh/dist
parentnode.scm (node-guile-version): Bugfix (diff)
downloadguile-ssh-35d44fe3114eb796bd432215111adbf1e5aef05e.tar.gz
node.scm (node-server-running?): Bugfix: Check the return code
* modules/ssh/dist/node.scm (node-server-running?): Bugfix: Check the return code of the executed command.
Diffstat (limited to 'modules/ssh/dist')
-rw-r--r--modules/ssh/dist/node.scm13
1 files changed, 7 insertions, 6 deletions
diff --git a/modules/ssh/dist/node.scm b/modules/ssh/dist/node.scm
index 4ec6d0a..0283c04 100644
--- a/modules/ssh/dist/node.scm
+++ b/modules/ssh/dist/node.scm
@@ -259,12 +259,13 @@ listens on an expected port, return #f otherwise."
(receive (result rc)
(rexec node (format #f "pgrep --full 'guile --listen=~a'"
(node-repl-port node)))
- (let ((rp (tunnel-open-forward-channel (node-tunnel node))))
- (and (channel-open? rp)
- (let ((line (read-line rp)))
- (close rp)
- (and (not (eof-object? line))
- (string-match "^GNU Guile .*" line)))))))
+ (and (zero? rc)
+ (let ((rp (tunnel-open-forward-channel (node-tunnel node))))
+ (and (channel-open? rp)
+ (let ((line (read-line rp)))
+ (close rp)
+ (and (not (eof-object? line))
+ (string-match "^GNU Guile .*" line))))))))
(define (node-run-server node)
"Run a RREPL server on a NODE."