26 lines
609 B
Scheme
26 lines
609 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 output exitno:\n"
|
|
(number->string (job-res-errno j-res)) "\n"
|
|
"job finished with output stdout:\n"
|
|
(job-res-stdout j-res) "\n"
|
|
"job finished with output stderr:\n"
|
|
(job-res-stderr j-res) "\n"))
|
|
(newline))
|
|
|