Don't blindly remove a process object.
This commit is contained in:
parent
238ba3e8ba
commit
64221a6b95
|
@ -53,6 +53,13 @@
|
|||
(lambda ()
|
||||
(weak-table-set! process-table n val))))
|
||||
|
||||
(define (process-table-delete-procobj! procobj)
|
||||
(with-lock process-table-lock
|
||||
(lambda ()
|
||||
(if (eq? (weak-table-ref process-table (proc:pid procobj))
|
||||
procobj)
|
||||
(weak-table-set! process-table (proc:pid procobj) #f)))))
|
||||
|
||||
(define (maybe-pid->proc pid)
|
||||
(process-table-ref pid))
|
||||
|
||||
|
@ -220,7 +227,7 @@
|
|||
;;; Finalizer for procobjs
|
||||
;;;
|
||||
(define (procobj-finalizer procobj)
|
||||
(process-table-set! (proc:pid procobj) #f)
|
||||
(process-table-delete-procobj! procobj)
|
||||
(if (not (proc:finished? procobj))
|
||||
(need-reaping-add! (proc:pid procobj))))
|
||||
|
||||
|
|
Loading…
Reference in New Issue