From: Fitzberg Brian Date: 2002-02-14T16:47:29+09:00 Subject: Re: restarting interpreter, undefining objects..? > Could you fake this multiple processes? That is, > fork off a child process when a plug-in is loaded? I thought about this a bit, and actually considered trying it out until I discovered that there doesn't seem to be a fork() equivalent in NT - if I'm really desperate I guess I'll start looking into NT processess. This all seems overly complicated, though, when all I want to do is something seemingly simple. I'm _almost_ tempted to delve into the ruby code itself and see if I can implement a reset/reinitialize function, or somehow figure out how to stop ruby killing the calling app when I shut it down. I don't have a lot of time, though. If it weren't for this simple yet fundamental problem, ruby would be _perfect_ for a dynamic, plug-in architecture. I tried doing something sneaky, but ran into some weird bugs: - load the plug-in (using rb_require) - instantiate object, call member functions, etc. - load a dummy plug-in (using rb_require), which overides all the previous plug-in object's methods. Unfortunately, this does not get rid of member objects, which is unsafe of course - load the new plug-in, again using rb_require Now, the interesting thing here is that it works, _sometimes_.. for some weird reason, the rb_requires fail, giving me :