GNU bug report logs - #12248
sleep: use realtime seconds, not relative seconds (be

Previous Next

Package: coreutils;

Reported by: Albrecht Frenzel <ajfrenzel <at> web.de>

Date: Tue, 21 Aug 2012 15:36:02 UTC

Severity: wishlist

Full log


Message #37 received at 12248 <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Pádraig Brady <P <at> draigBrady.com>
Cc: 12248 <at> debbugs.gnu.org, Eric Blake <eblake <at> redhat.com>,
	Albrecht Frenzel <ajfrenzel <at> web.de>, Bob Proulx <bob <at> proulx.com>
Subject: Re: bug#12248: sleep is not arware of suspend mode
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.




This bug report was last modified 6 years and 331 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.