Record job failure on non-0 exit status

This is helpful when the jobs fail through Guile running out of memory for
example.
This commit is contained in:
Christopher Baines 2022-01-12 18:17:35 +00:00
parent f1d8d76c4d
commit 6102553d94
1 changed files with 8 additions and 3 deletions

View File

@ -103,10 +103,15 @@
;; No process to wait for
#f)
((pid . status)
(match (hash-ref processes pid)
((_ (id))
(simple-format (current-error-port)
"pid ~A (job: ~A) failed with status ~A\n"
pid id status)
(handle-job-failure id)))
(hashv-remove! processes pid)
(simple-format (current-error-port)
"pid ~A failed with status ~A\n"
pid status)
;; Recurse, to check for other finished processes.
(wait-on-processes))))