[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug-gnulib] Re: detecting nonconforming nanosleep

From: Jim Meyering
Subject: [bug-gnulib] Re: detecting nonconforming nanosleep
Date: Mon, 28 Feb 2005 21:04:40 +0100

Paul Eggert <address@hidden> wrote:
> Come to think of it, how about the following idea instead?
> Let's remove the workaround entirely.
> This will cause "sleep" to sleep for too long on some buggy Linux
> kernels, but the behavior will still conform to POSIX, as POSIX allows
> "sleep" etc. to sleep for a longer time than requested.  This will
> greatly simplify our configuration hassles, and will cause the "sleep"
> command to no longer need -lrt.  (And if someone complains, we can ask
> them to fix their kernel.  :-)


> Here's a proposed coreutils patch along these lines.
> 2005-02-28  Paul Eggert  <address@hidden>
>       Remove workaround for bug in Linux kernel 2.6.8 or thereabouts.
>       The workaround isn't strictly needed for POSIX conformance, and
>       it's too much of a pain to configure and maintain.  We'll ask
>       people to fix their kernels instead.
>       * lib/xnanosleep: Don't include gethrxtime.h or xtime.h.
>       (xnanosleep): Remove the workaround.
>       * m4/xnanosleep.m4 (gl_XNANOSLEEP): Remove configuration attempting
>       to detect nanosleep bug.

I like it.

Besides, from the perspective of sleep(1), the difference in behavior
isn't so bad.  At one point, I'd even added an option to sleep to enable
the interpretation that's implemented by some of the buggy nanosleep
implementations (which meant not counting time between suspend/continue).

reply via email to

[Prev in Thread] Current Thread [Next in Thread]