Message60666
1) A C extension module (foo.so) is imported
import foo
2) The library foo.so is rebuilt with changes
3) We reload the module
foo = reload(foo)
The reload() method calls imp.load_dynamic() which
eventually gets down to _PyImport_GetDynLoadFunc().
This just calls dlopen(), which returns the old filehandle.
This problem can be fixed by augmenting imp with
unload_dynamic(), which could easily be implemented in
a _PyImport_GetDynUnloadFunc(), which would just
consult its handles[] array, and call dlclose() on the
appropriate handle. This will work if Python was the
only program to dlopen() foo.so. |
|
Date |
User |
Action |
Args |
2008-01-20 09:57:31 | admin | link | issue1144263 messages |
2008-01-20 09:57:31 | admin | create | |
|