From: Taylor R Campbell Date: Mon, 3 Nov 2014 20:43:17 +0000 (+0000) Subject: Reset dld (.so) handles on restore. X-Git-Tag: mit-scheme-pucked-9.2.12~376^2~132 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=e954543906316debf8099645675685ef2d886a70;p=mit-scheme.git Reset dld (.so) handles on restore. --- diff --git a/src/runtime/io.scm b/src/runtime/io.scm index c3866bbaa..93f23e891 100644 --- a/src/runtime/io.scm +++ b/src/runtime/io.scm @@ -44,7 +44,8 @@ USA. directory-channel/descriptor set-directory-channel/descriptor!)) (initialize-select-registry!) - (set! dld-handles '()) + (reset-dld-handles!) + (add-event-receiver! event:after-restore reset-dld-handles!) unspecific) (define-structure (channel (constructor %make-channel)) @@ -736,6 +737,10 @@ USA. (define dld-handles) +(define (reset-dld-handles!) + (set! dld-handles '()) + unspecific) + (define (dld-unload-file handle) (guarantee-dld-handle handle 'DLD-UNLOAD-FILE) (without-interrupts @@ -767,14 +772,4 @@ USA. (find-matching-item dld-handles predicate)) (define (all-dld-handles) - (list-copy dld-handles)) - -(define (unload-all-dld-object-files) - (without-interrupts - (lambda () - (let loop () - (if (pair? dld-handles) - (let ((handle (car dld-handles))) - (set! dld-handles (cdr dld-handles)) - (%dld-unload-file handle) - (loop))))))) \ No newline at end of file + (list-copy dld-handles)) \ No newline at end of file