From e83f3e7d81ec0a573383bfb2b25811631f80e820 Mon Sep 17 00:00:00 2001 From: eknauel Date: Thu, 11 Aug 2005 09:36:10 +0000 Subject: [PATCH] Display the status of foreground jobs in the result buffer (instead of #{Unspecific}) --- scheme/job.scm | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/scheme/job.scm b/scheme/job.scm index efbc946..5d346f8 100644 --- a/scheme/job.scm +++ b/scheme/job.scm @@ -281,8 +281,9 @@ (define (save-tty-excursion port thunk) (let ((settings (tty-info port))) - (thunk) - (set-tty-info/now port settings))) + (let ((val (thunk))) + (set-tty-info/now port settings) + val))) ;; run a job by running the program form @@ -305,7 +306,7 @@ (define-syntax run/console (syntax-rules () ((_ pf) - (run/console* (cons 'run (quote pf)))))) + (run/console* `(run (quote pf)))))) ;; for use in command mode (used by command-line-compiler) (define (run/fg* s-expr) @@ -326,11 +327,14 @@ (set-process-group (pid) (pid)) (set-tty-process-group (current-output-port) (pid)) (eval-s-expr s-expr))))) - (job-status (make-job-sans-console s-expr proc)) - (set-tty-process-group (current-output-port) foreground-pgrp) - (display "Press any key to return to Commander S...") - (wait-for-key) - (release-lock paint-lock))))) + (let ((job (make-job-sans-console s-expr proc))) + (job-status job) + (set-tty-process-group (current-output-port) foreground-pgrp) + (newline) + (display "Press any key to return to Commander S...") + (wait-for-key) + (release-lock paint-lock) + job))))) (define-syntax run/fg (syntax-rules () @@ -355,7 +359,7 @@ (define-syntax run/bg (syntax-rules () ((_ pf) - (run/bg* (cons 'run (quote pf)))))) + (run/bg* `(run ,(quote pf)))))) (define (init-evaluation-environment package) (let ((structure (reify-structure package)))