26 lines
598 B
Scheme
26 lines
598 B
Scheme
(define-record-type :job-desc
|
|
(make-job-desc wd env cmd)
|
|
job-desc?
|
|
(wd job-desc-wd)
|
|
(env job-desc-env)
|
|
(cmd job-desc-cmd))
|
|
|
|
(define-record-type :job-res
|
|
(make-job-res errno stdout stderr)
|
|
job-res?
|
|
(errno job-res-errno)
|
|
(stdout job-res-stdout)
|
|
(stderr job-res-stderr))
|
|
|
|
(define (display-job-output j-res)
|
|
(display
|
|
(string-append
|
|
";;; job finished with exitno: "
|
|
(number->string (job-res-errno j-res)) "\n"
|
|
";;; job finished with stdout:\n"
|
|
(job-res-stdout j-res) "\n"
|
|
";;; job finished with stderr:\n"
|
|
(job-res-stderr j-res) "\n"))
|
|
(newline))
|
|
|