Artur, thank you for your prompt replies!
> Sure, CORE::GLOBAL::, read relevant stuff in perldoc perlsub I think.
I attach a module I have written based on some of those ideas. It is not
documented (yet?) but its functionality should be quite obvious. Using it,
I had to add just few lines to Win32::API source to fix the problem we've
been discussing. Those lines just add a handler which runs in child thread
after fork and makes Win32::API "forget" about all the dll's that have been
loaded on behalf of parent thread:
package Win32::API;
...
use AtFork;
add_fork_handler('child',sub {
%Libraries = ();
%Procedures = ();
});
The question is, should I do anything with my AtFork module and make it
public, or just keep it for myself to avoid embarrassment?
* * *
-= Kirill Shpitsa =-
Languages understood: Russian, Ukrainian and English
atfork.pm