offload: Better synchronize with remote invocation of 'guix archive --missing'.
authorLudovic Courtès <ludo@gnu.org>
Sun, 13 Apr 2014 22:17:43 +0000 (00:17 +0200)
committerLudovic Courtès <ludo@gnu.org>
Sun, 13 Apr 2014 22:17:43 +0000 (00:17 +0200)
* guix/scripts/offload.scm (send-files)[missing-files]: Call 'waitpid'
  after reading all of MISSING.

guix/scripts/offload.scm

index c5cae4b..e340b7e 100644 (file)
@@ -443,9 +443,11 @@ success, #f otherwise."
                           "-i" (build-machine-private-key machine)
                           (build-machine-name machine)
                           "guix" "archive" "--missing")
-                    (open-input-string files))))
+                    (open-input-string files)))
+                  ((result)
+                   (get-string-all missing)))
       (for-each waitpid pids)
-      (string-tokenize (get-string-all missing))))
+      (string-tokenize result)))
 
   (with-store store
     (guard (c ((nix-protocol-error? c)