Hi all,
this is my first post here so please bare with me
I would like to do roughly the following:
But this gives me zombies and ps -ef shows (defunct) on both parent and child. Now every child could take several minutes to complete and it is possible that the parents would be able to create several childs during a minute.
How would I solve this (detaching the child from the parent) without waiting inside the parentloop?
Any help or directions is appreciated
this is my first post here so please bare with me
I would like to do roughly the following:
Code:
while (<>) {
if (something) {
unless (fork) { mail($_); }
}
sub mail
{
mailingcode....
exit();
}
But this gives me zombies and ps -ef shows (defunct) on both parent and child. Now every child could take several minutes to complete and it is possible that the parents would be able to create several childs during a minute.
How would I solve this (detaching the child from the parent) without waiting inside the parentloop?
Any help or directions is appreciated