From fc115693f49bd3367fc81876b8905e01d2b48007 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Wed, 17 Jun 2009 05:58:26 +0000 Subject: [PATCH] change zo-compiler cm trace-output to stick to a port, which avoids confusing output when installing nested Planet packages svn: r15194 --- collects/compiler/compiler-unit.ss | 3 ++- collects/setup/plt-single-installer.ss | 11 +++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/collects/compiler/compiler-unit.ss b/collects/compiler/compiler-unit.ss index 57fc93c465..ed18fb3fcb 100644 --- a/collects/compiler/compiler-unit.ss +++ b/collects/compiler/compiler-unit.ss @@ -149,7 +149,8 @@ [current-load-relative-directory dir] ;; Verbose compilation manager: [manager-trace-handler (if verbose? - (lambda (s) (printf "~a\n" s)) + (let ([op (current-output-port)]) + (lambda (s) (fprintf op "~a\n" s))) (manager-trace-handler))] [manager-compile-notify-handler (lambda (path) ((compile-notify-handler) path))]) diff --git a/collects/setup/plt-single-installer.ss b/collects/setup/plt-single-installer.ss index fcbe814cb5..0b54d4842f 100644 --- a/collects/setup/plt-single-installer.ss +++ b/collects/setup/plt-single-installer.ss @@ -76,5 +76,12 @@ setup:option@ set-options@ setup@)))))]) - (thread-wait thd) - (custodian-shutdown-all cust)))))) + (dynamic-wind + void + (lambda () + (with-handlers ([exn:break? (lambda (exn) + (break-thread thd) + (sleep 0.1) + (raise exn))]) + (thread-wait thd))) + (lambda () (custodian-shutdown-all cust))))))))