}elsif($pid == 0){ # This is the child, it will log when the parent is done + + while(!&parentIsDead){sleep(10);} # &finalLog($traceFileToLog); + + &finalLog($traceFileToLog, $initialString); exit(0); sub parentIsDead { if(getppid()==1){ return 1; } return 0; }
In reply to Re^4: Fork Causing <defunct>
by owen
in thread Fork Causing <defunct>
by owen
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |