lkml.org 
[lkml]   [2005]   [Jan]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: patch to fix set_itimer() behaviour in boundary cases
    Matthias Lang <matthias@corelatus.se> wrote:
    >> The linux implementation of setitimer() doesn't behave quite as
    >> expected. I found several problems:
    >> 1. POSIX says that negative times should cause setitimer() to
    >> return -1 and set errno to EINVAL. In linux, the call succeeds.
    >> 2. POSIX says that time values with usec >= 1000000 should
    >> cause the same behaviour. In linux, the call succeeds.
    >> 3. If large time values are given, linux quietly truncates them
    >> to the maximum time representable in jiffies. On 2.4.4 on PPC,
    >> that's about 248 days. On 2.6.10 on x86, that's about 24 days.
    >> POSIX doesn't really say what to do in this case, but looking at
    >> established practice, i.e. "what BSD does", since the call comes
    >> from BSD, *BSD returns -1 if the time is out of range.

    On Sat, Jan 15, 2005 at 01:30:13AM -0800, Andrew Morton wrote:
    > These are things we probably cannot change now. All three are arguably
    > sensible behaviour and do satisfy the principle of least surprise. So
    > there may be apps out there which will break if we "fix" these things.
    > If the kernel version was 2.7.0 then well maybe...

    We can easily do a "rolling upgrade" by adding new versions of the
    system calls, giving glibc and apps grace periods to adjust to them,
    and nuking the old versions in a few years.


    -- wli
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-03-22 14:09    [W:0.020 / U:60.296 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site