[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: xnanosleep range with 64 bit time_t
From: |
Frank v Waveren |
Subject: |
Re: xnanosleep range with 64 bit time_t |
Date: |
Wed, 30 Aug 2006 23:50:25 +0200 |
User-agent: |
Mutt/1.5.9i |
On Sun, Aug 27, 2006 at 11:43:30AM +0200, Frank v Waveren wrote:
> lib/xnanosleep.c currently assumes nanosleep works with any value that
> can be fit into the struct timespec. For gnu+linux on a
> platform with 64 bit longs, this isn't true (it currently doesn't even
> return and error but just silently integer-overflows, but I've
> submitted a patch to make it error).
Thomas Gleixner has submitted a replacing patch that instead just
limits the timespec passed to the maximum, so that would make this
patch unnecessary for linux (at least for those with new kernels).
I think I prefer my solution of having it error, but even if his patch
gets accepted into 2.6.18, that still leaves everyone with an older
kernel, and solaris users (and given that I only checked linux and
solaris, other OSes are likely to have th same problem), so I still
think this patch to xnanosleep is worthwhile.
--
Frank v Waveren Key fingerprint: BDD7 D61E
address@hidden 5D39 CF05 4BFC F57A
Public key: hkp://wwwkeys.pgp.net/468D62C8 FA00 7D51 468D 62C8
signature.asc
Description: Digital signature