[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
perl, select, alarm
From: |
Marcus Brinkmann |
Subject: |
perl, select, alarm |
Date: |
Sun, 22 Jul 2001 03:40:03 +0200 |
User-agent: |
Mutt/1.2i |
Hi,
the following program prints five times
Tick!
Select returned!
and then stops. On a sane system.
On the Hurd, it always prints Tick! and never returns from select.
It's stuck in an infinite loop. This breaks a test in a package.
I don't know how hard or easy it is to cok up a C testcase, I will
check later. Maybe it is a bug in perl.
Thanks,
Marcus
$SIG{ALRM} = "tick";
$i = 5;
while ($i)
{
alarm(2.5);
select (undef, undef, undef, 10);
print "Select returned!\n";
}
sub tick
{
print "Tick!\n";
$i--;
}
$SIG{ALRM} = 'DEFAULT';
print "ok\n";
- perl, select, alarm,
Marcus Brinkmann <=