Don't blindly remove a process object.

This commit is contained in:
mainzelm 2002-02-14 13:32:19 +00:00
parent 238ba3e8ba
commit 64221a6b95
1 changed files with 8 additions and 1 deletions

View File

@ -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))))