Problems? Is your data what you think it is? | |
PerlMonks |
defunct process are WAY beyond my experiencby cristj1 (Novice) |
on Jul 03, 2017 at 15:43 UTC ( [id://1194091]=perlquestion: print w/replies, xml ) | Need Help?? |
cristj1 has asked for the wisdom of the Perl Monks concerning the following question: I'm pretty green and novice-like on PERL. I migrated a 10+ year old Perl script from Solaris 10 (!) to RHEL 7.3, Perl (v5.8.8) to (v5.16.3). It mostly runs great but I continue to have recurring problems with defunct processes. I've read tons of articles on threads, join, $SIG{CHLD} = 'IGNORE', etc. I basically understand I'm not reaping child processes correctly but am way over my head on how to correct it. I could take a week or two to bone up but I hope someone will have pity on this poor beggar and help me out. The script kicks off a bunch of child processes. They do their thing and the main script SEEMs to try to clean up a bit by simply doing a "join" on each child. This worked fine on the old system. Now, it only seems to work OK when the number of children is small--say less than 50--but seems to result in defuncts when the "family" is much bigger than around 50. Here are what I think are the salient bits of code. Can you help? I THINK I need to do a "wait" or a $SIG{CHLD} = 'IGNORE', but I don't know enough to just try things. Can you help? Here's where the kids get born:
They do their thing in their respective subroutines, then the main thread does the following in efforts to clean up.
I REALLY appreciate your help!
Back to
Seekers of Perl Wisdom
|
|