in reply to Re^3: Fork Causing <defunct>
in thread Fork Causing <defunct>
}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; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Fork Causing <defunct>
by almut (Canon) on Mar 18, 2010 at 17:37 UTC |