[racket-dev] results of dlopen (hence ffi) persistent across evaluations?

From: YC (yinso.chen at gmail.com)
Date: Fri Aug 6 14:29:02 EDT 2010

IIRC it's due to dlopen holding the reference to the deleted file in memory
until it's closed - it does not check with the filesystem again in the mean
time.  Windows will prevent the lib from being deleted.  For *nix it's
generally prevented by restricted access to the lib (and assuming people
with higher privilege won't do such things).

Cheers,
yc

On Fri, Aug 6, 2010 at 8:22 AM, Noel Welsh <noelwelsh at gmail.com> wrote:

> AFAIK it is unavoidable.
>
> N.
>
> On Fri, Aug 6, 2010 at 4:08 PM, John Clements <clements at brinckerhoff.org>
> wrote:
> > It appears that the results of ffi-lib are persistent across evaluations.
> Specifically, if I use ffi-lib to load a library, then go to the filesystem
> and replace this library with garbage, subsequent evaluations still
> cheerfully use the version that I just destroyed.
> >
> > I'm guessing that this behavior is unavoidably inherited from the OS
> (this is mac OS X).  If so, may I add a warning to the ffi-lib docs that
> states this? If this is not something unavoidable, of course, I'd much
> rather just change it.
> >
> > John
> _________________________________________________
>  For list-related administrative tasks:
>   http://lists.racket-lang.org/listinfo/dev
>



-- 
Cheers,
yc

Taming the software dragon - http://dragonmaestro.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/dev/archive/attachments/20100806/c246a691/attachment.html>

Posted on the dev mailing list.