Subject: Re: bug#12248: sleep is not arware of suspend mode

From: Paul Eggert <[email-masked]>
Date: Tue, 21 Aug 2012 20:18:26 -0700

On 08/21/2012 05:15 PM, Pádraig Brady wrote:
> I agree that either behavior could be required.
> The default though should probably stay as is.
> I.E. when the system suspends, the timeout suspends too.

But that's not what 'sleep' does, on systems where
'nanosleep' uses real time, which is what POSIX
specifies.

The Linux kernel uses CLOCK_MONOTONIC for nanosleep,
as opposed to the POSIX-specified CLOCK_REALTIME.
This is an infelicity.  It'd be nicer if 'sleep'
acted as if it were using a realtime clock when
running under the Linux kernel, just as 'sleep'
does on other POSIX systems.