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. cheers, pg On Tue, Jul 7, 2015 at 10:25 PM, <izaber...@gmail.com> wrote: > The mypid loadable in the examples directory sets a dynamic variable. > Bash segfaults if you reference it after using enable -d enable_mypid. > > $ enable -f ./mypid enable_mypid > $ enable_mypid > $ enable -d enable_mypid > $ echo $MYPID > Segmentation fault (core dumped) > > enable should keep track of the dynamic variables it sets and unset them > when using dlclose(). > > > > --- > xoxo iza >