Skip to content
Snippets Groups Projects
Commit a4b42825 authored by Ludovic Courtès's avatar Ludovic Courtès
Browse files

offload: Bail out when failing to register a GC root on the build machine.

* guix/scripts/offload.scm (register-gc-root): Call 'leave' when
  'close-pipe' returns non-zero.
parent 8a9d928f
No related branches found
No related tags found
No related merge requests found
......@@ -317,7 +317,12 @@ (define script
(let ((pipe (remote-pipe machine OPEN_READ
`("guile" "-c" ,(object->string script)))))
(get-string-all pipe)
(close-pipe pipe)))
(let ((status (close-pipe pipe)))
(unless (zero? status)
;; Better be safe than sorry: if we ignore the error here, then FILE
;; may be GC'd just before we start using it.
(leave (_ "failed to register GC root for '~a' on '~a' (status: ~a)~%")
file machine status)))))
(define (remove-gc-root machine)
"Remove from MACHINE the GC root previously installed with
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment