fix constructor

This commit is contained in:
eknauel 2005-06-04 09:42:45 +00:00
parent 2f7595603b
commit b9d54a24ae
1 changed files with 8 additions and 4 deletions

View File

@ -1,5 +1,5 @@
(define-record-type job :job (define-record-type job :job
(make-job name pty-in pty-out proc status) (really-make-job name pty-in pty-out proc status)
job? job?
(name job-name) (name job-name)
(pty-in job-pty-in) (pty-in job-pty-in)
@ -7,9 +7,13 @@
(proc job-proc) (proc job-proc)
(status really-job-status)) (status really-job-status))
(define-record-discloser :job
(lambda (r)
`(job ,(job-name r))))
(define (make-job name pty-in pty-out proc) (define (make-job name pty-in pty-out proc)
(let ((job (make-job name pty-in pty-out proc (let ((job (really-make-job name pty-in pty-out proc
(make-placeholder)))) (make-placeholder))))
(spawn-job-status-surveillant job) (spawn-job-status-surveillant job)
(add-job! job) (add-job! job)
job)) job))
@ -25,7 +29,7 @@
(spawn (spawn
(lambda () (lambda ()
(placeholder-set! (placeholder-set!
(really-job-status job) (wait (job-proc))))))) (really-job-status job) (wait (job-proc job)))))))
(define (signal-job signal job) (define (signal-job signal job)
(signal-process-group signal (job-proc job))) (signal-process-group signal (job-proc job)))