good chemistry is complicated,
and a little bit messy -LW
Fork vs Win32::OLEby Fré (Initiate)
|on Jan 23, 2013 at 09:14 UTC||Need Help??|
Fré has asked for the
wisdom of the Perl Monks concerning the following question:
While querying churches sequentially, took literally hours, I've been trying to query them in parallel.
Every fork is supposed to generate a file-per-church.
Whereafter each file will be loaded and stored in a major hash, which would be parsed using Win32::OLE to generate an excel-doc.
Yet, it all seems to work until I load the Win32::-modules. Forking (still learning heaps about that thing) works rather the way I want it, but when I try to merge the fork-code with excel-part, then waitpid never returns.
Forking goes up until exit, but waitpid seems to wait forever.
I'm not sure how to interpret filehandles during forks, so wondering whether something remains open and locking the fork.
I'm bound to use ActiveState Perl 5.6(.1?).
Here's how I tried it.