HI,
I found a problem in my script.I call sleep function in a child process
(sleep 3600 sec,then wake up and do something).
But these days I found sleep can't wake up.I checked it carefully,and
find that when sleeping,if disks I/O error occured (such as 100% disks
space using,no free space for writing),the sleep will have something the
matter -- it never wake up from that time.
Is this true?and how can I resolve this problem?tks more.
btw: my codes about sleep are below:
--------------------------------------------------------
die "can't fork:$!" unless defined (my $child = fork());
if ($child==0)
{
while(1)
{
sleep 3600;
my %total=();
open (HD,$log) or die "can't read from logfile:$!";
while(<HD>)
{
next if /^$/;
chomp;
my ($mbox_id,$size,$type)=split(/:/,$_);
$total{$mbox_id}{$type}+=$size;
}
close HD;
`cat /dev/null > $log`;
&disable(\%total);
}
}
----------------------------------------------------------
--
Jeff Pan
[EMAIL PROTECTED]
--
http://www.fastmail.fm - Choose from over 50 domains or use your own
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>