On 7/7/15 5:49 PM, Piotr Grzybowski wrote: > hi, > > maybe I am mistaken, but I think that keeping track of the > variables/functions bound/unbound by the loadable bultins leads to a > complete hell of unmanageable code. > It should be noted, that the builtins should clean by themselves, > e.g., in this case mypid.c should contain something like: > > int __attribute__((destructor)) enable_mypid_builtin_destructor(void) { > unbind_variable("MYPID"); > } > > which removes the calls to noexistent code after the builtin code has > been removed via dlclose, and cleans the segfault.
This is the right approach, but a disable hook (destructor) needs to be part of the interface somehow, which has potentially wide-ranging consequences. I will have to think about how to do it. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, ITS, CWRU c...@case.edu http://cnswww.cns.cwru.edu/~chet/