|
Posted by Martijn Lievaart on April 15, 2008, 2:58 pm
Please log in for more thread options
On Tue, 15 Apr 2008 12:07:33 -0400, Mark Seger wrote:
>> The useconds_t type is only defined to support values up to 1,000,000.
>> Depending on undefined behavior is a mistake on the caller's part. The
>> AIX C library also returns an error if values >1M are passed in; it's
>> not a glibc bug.
>> ualarm is replaced by setitimer, which has seconds and microseconds.
>> --S
>
> I've been thinking about this some more, and I guess the question in my
> mind is how did this ever work? pre HiRes .91, ularm of 10 seconds
> works with glibc 2.3 and doesn't work with glibc 2.4.
If something is defined only when <condition> holds it is not defined
that it will not work <condition> doesn't hold. It might even work in
case condition is not satisfied! But depending on that undefined
behaviour might break in the next release, as was most probably the case
here.
M4
|