Q
Qi
I try to use 3 children to load data into Oracle dataabase.
But my script is hanging. I suspect the hanging is caused by writing
the same logfile by the children.
I can not reproduce it. The hanging happens only occasionally.
Any help is appreciated. Thanks.
while (!finished) {
if ($Processed == 3) {
if (($cpid = wait()) != -1) {
print FH_LOG ("Child ready...\n");
}
} else {
print FH_LOG ("----- Uploading new file\n");
StartChild;
}
}
sub StartChild {
$cpid = fork();
die unless defined $cpid;
if (! $cpid) {
system ("sqlldr parfile=File.PAR");
exit;
} else {
print ("New child: $cpid\n");
}
}
But my script is hanging. I suspect the hanging is caused by writing
the same logfile by the children.
I can not reproduce it. The hanging happens only occasionally.
Any help is appreciated. Thanks.
while (!finished) {
if ($Processed == 3) {
if (($cpid = wait()) != -1) {
print FH_LOG ("Child ready...\n");
}
} else {
print FH_LOG ("----- Uploading new file\n");
StartChild;
}
}
sub StartChild {
$cpid = fork();
die unless defined $cpid;
if (! $cpid) {
system ("sqlldr parfile=File.PAR");
exit;
} else {
print ("New child: $cpid\n");
}
}