diff options
author | Ludovic Courtès <ludo@gnu.org> | 2013-05-14 23:51:36 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2013-05-14 23:51:36 +0200 |
commit | 91fe0e20c7da2b706a1ac0e7b75235b6c1e6ed0a (patch) | |
tree | 1579c2b5dc616cdd9f8177722d8b93fbdf2df8c4 /guix/scripts/package.scm | |
parent | b30b13dc3d881d734098599540aa0bb13bcf7e61 (diff) | |
download | guix-patches-91fe0e20c7da2b706a1ac0e7b75235b6c1e6ed0a.tar guix-patches-91fe0e20c7da2b706a1ac0e7b75235b6c1e6ed0a.tar.gz |
ftp-client: Let callers handle `ftp-open' exceptions.
* guix/ftp-client.scm (ftp-open): Let exceptions through.
* guix/scripts/package.scm (waiting): Wrap EXP in a `dynamic-wind', so
the line is always cleared.
Diffstat (limited to 'guix/scripts/package.scm')
-rw-r--r-- | guix/scripts/package.scm | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/guix/scripts/package.scm b/guix/scripts/package.scm index 5c6a118560..094d348ac9 100644 --- a/guix/scripts/package.scm +++ b/guix/scripts/package.scm @@ -307,13 +307,15 @@ return its return value." (force-output (current-error-port)) (call-with-sigint-handler (lambda () - (let ((result exp)) - ;; Clear the line. - (display #\cr (current-error-port)) - (display blank (current-error-port)) - (display #\cr (current-error-port)) - (force-output (current-error-port)) - exp)) + (dynamic-wind + (const #f) + (lambda () exp) + (lambda () + ;; Clear the line. + (display #\cr (current-error-port)) + (display blank (current-error-port)) + (display #\cr (current-error-port)) + (force-output (current-error-port))))) (lambda (signum) (format (current-error-port) " interrupted by signal ~a~%" SIGINT) #f)))) |