diff options
-rw-r--r-- | src/image.lisp | 30 |
1 files changed, 13 insertions, 17 deletions
diff --git a/src/image.lisp b/src/image.lisp index bde16a1..90bdab0 100644 --- a/src/image.lisp +++ b/src/image.lisp @@ -264,30 +264,26 @@ already running from FILENAME." (eval-input) (with-fork-control (eval-input))))))) (unwind-protect - (let* (outbuf - (out-reader - (bt:make-thread - (lambda () - (setq outbuf - (read-file-string out :element-type 'character))))) - errbuf - (err-reader - (bt:make-thread - (lambda () - (setq errbuf - (read-file-string err :element-type 'character))))) - (status (nth-value 1 (nix:waitpid child)))) + (let ((out-reader + (bt:make-thread + (lambda () + (read-file-string out :element-type 'character)))) + (err-reader + (bt:make-thread + (lambda () + (read-file-string err :element-type 'character)))) + (status (nth-value 1 (nix:waitpid child)))) (unless (nix:WIFEXITED status) (failed-change "~&Grandchild process did not exit normally, status #x~(~4,'0X~)." status)) - (bt:join-thread out-reader) - (bt:join-thread err-reader) (with-open-file (output output :direction :output :if-exists :append :element-type 'character) - (write-to-mkfifo - (list outbuf errbuf (nix:WEXITSTATUS status)) output))) + (write-to-mkfifo (list (bt:join-thread out-reader) + (bt:join-thread err-reader) + (nix:WEXITSTATUS status)) + output))) (delete-file out) (delete-file err)))) (defclass asdf-requirements () |