summaryrefslogtreecommitdiff
path: root/guix/ssh.scm
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2018-11-29 15:56:49 +0100
committerMarius Bakke <mbakke@fastmail.com>2018-11-29 15:56:49 +0100
commit25ca46985ccb26880f98b479d2a3ac862b20006e (patch)
treeb52670028a36c5815f16311438c4c5f1f0f3e759 /guix/ssh.scm
parente2b9ed7fcc019df290f0f5bbe221803efb031123 (diff)
parent7af6e5daa4ffb1bbda48a4e990815066f21bdadc (diff)
downloadgnu-guix-25ca46985ccb26880f98b479d2a3ac862b20006e.tar
gnu-guix-25ca46985ccb26880f98b479d2a3ac862b20006e.tar.gz
Merge branch 'master' into core-updates
Diffstat (limited to 'guix/ssh.scm')
-rw-r--r--guix/ssh.scm6
1 files changed, 4 insertions, 2 deletions
diff --git a/guix/ssh.scm b/guix/ssh.scm
index 25ec8295e8..104f4f52d6 100644
--- a/guix/ssh.scm
+++ b/guix/ssh.scm
@@ -297,9 +297,11 @@ Return the list of store items actually sent."
(channel-send-eof port)
;; Wait for completion of the remote process and read the status sexp from
- ;; PORT.
+ ;; PORT. Wait for the exit status only when 'read' completed; otherwise,
+ ;; we might wait forever if the other end is stuck.
(let* ((result (false-if-exception (read port)))
- (status (zero? (channel-get-exit-status port))))
+ (status (and result
+ (zero? (channel-get-exit-status port)))))
(close-port port)
(match result
(('success . _)