Skip Menu |

This queue is for tickets about the Time-HiRes CPAN distribution.

Report information
The Basics
Id: 87160
Status: resolved
Priority: 0/
Queue: Time-HiRes

Owner: Nobody in particular
Requestors: galama [...]

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)

Subject: Time::HiRes::alarm() ignores EINVAL from setitimer()
Date: Mon, 22 Jul 2013 18:39:36 +0200
To: bug-Time-HiRes [...]
From: Anand Galama <galama [...]>
Download (untitled) / with headers
text/plain 680b
According to the docs, alarm() is supposed to return undef if an error occurred. This is not the case when setitimer() sets EINVAL: $ strace -e trace=setitimer,write perl -MTime::HiRes=alarm -E '$|=1; say $Time::HiRes::VERSION; say alarm(1); say alarm(3000);' >/dev/null write(1, "1.9725\n", 7) = 7 setitimer(ITIMER_REAL, {it_interval={0, 0}, it_value={1, 0}}, {it_interval={0, 0}, it_value={0, 0}}) = 0 write(1, "0\n", 2) = 2 setitimer(ITIMER_REAL, {it_interval={0, 0}, it_value={18446744073709550322, 18446744073708584320}}, 0x7fff4a0a6d90) = -1 EINVAL (Invalid argument) write(1, "0\n", 2) = 2 +++ exited with 0 +++ $
From: galama [...]
Download (untitled) / with headers
text/plain 101b
Moreover, the setitimer() arguments are completely messed up. it_value should actually be {3000, 0}.
Fixed in Time-HiRes-1.9726, now on CPAN.

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to