From: Han-Wen Nienhuys Date: Mon, 8 Jan 2007 10:20:28 +0000 (+0100) Subject: Show exit value and whether terminated with signal for subjobs. X-Git-Tag: release/2.10.10-1~19 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=cfcddfd0e6017a2484f01cef67c7d4bf234dcb8d;p=lilypond.git Show exit value and whether terminated with signal for subjobs. Conflicts: scm/lily.scm --- diff --git a/scm/lily.scm b/scm/lily.scm index d5121fe32b..045ac460d6 100644 --- a/scm/lily.scm +++ b/scm/lily.scm @@ -490,25 +490,32 @@ The syntax is the same as `define*-public'." (for-each (lambda (pid) (let* ((stat (cdr (waitpid pid)))) - + (if (not (= stat 0)) - (set! errors (cons (list-element-index joblist pid) errors))))) + (set! errors (acons (list-element-index joblist pid) stat errors))))) joblist) (for-each (lambda (x) - (let* ((logfile (format "~a-~a.log" - (ly:get-option 'log-file) x)) + (let* ((job (car x)) + (state (cdr x)) + (logfile (format "~a-~a.log" + (ly:get-option 'log-file) job)) (log (ly:gulp-file logfile)) (len (string-length log)) (tail (substring log (max 0 (- len 1024))))) - (display (format "\n\nlogfile ~a:\n\n ~a" logfile tail)))) + (if (status:term-sig state) + (ly:message "\n\n~a\n" + (format (_ "job ~a terminated with signal: ~a") + job + (status:term-sig state))) + (ly:message (_ "logfile ~a (exit ~a):\n~a") logfile (status:exit-val state) tail)))) errors) (if (pair? errors) - (ly:error "Children ~a exited with errors." errors)) + (ly:error "Children ~a exited with errors." (map car errors))) (exit (if (null? errors) 0 1)))))) @@ -555,6 +562,7 @@ The syntax is the same as `define*-public'." (if (= (random 40) 1) (ly:reset-all-fonts)))) + files) failed))