Project

General

Profile

Actions

Feature #11876

closed

Want a native sleep

Added by Robert Mustacchi almost 4 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Normal
Category:
cmd - userland programs
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:
External Bug:

Description

Today sleep(1) is implemented in terms of ksh93. ksh93 has not been well maintained and the version in-gate is buggy. As part of making it easier to update ksh93 and to fix bugs like 6520, 1239, etc.. I've opted to deal with this by implementing a new sleep(1) command that handles these cases, among others and honors some of the features that are common between the ksh93, GNU, and other versions. As part of this, I've written a new test suite to verify that we are properly parsing times in different locales and honors the locale's indicator for the fractional digit correctly. Passing an unsupported version will no longer cause one to sleep forever.


Related issues

Related to illumos gate - Bug #6520: ksh: sleep could wait foreverClosed2015-12-18

Actions
Related to illumos gate - Bug #1239: sleep should not be locale sensitiveResolvedRobert Mustacchi2011-07-22

Actions
Related to illumos gate - Bug #12069: Backport sh_delay() and tvsleep() from ksh-2020.0.0Closed

Actions
Actions #1

Updated by Robert Mustacchi almost 4 years ago

  • Related to Bug #6520: ksh: sleep could wait forever added
Actions #2

Updated by Robert Mustacchi almost 4 years ago

  • Related to Bug #1239: sleep should not be locale sensitive added
Actions #3

Updated by Garrett D'Amore almost 4 years ago

Yay. I've long felt that abdicating a bunch of stuff to the ksh93 implementation was a mistake; I even protested it at Sun (I was a minority opinion at PSARC on this.)

Actions #5

Updated by Andy Fiddaman almost 4 years ago

  • Related to Bug #12069: Backport sh_delay() and tvsleep() from ksh-2020.0.0 added
Actions #6

Updated by Robert Mustacchi over 3 years ago

This was tested by the new test suite and manual use in addition.

Actions #7

Updated by Electric Monk over 3 years ago

  • Status changed from New to Closed

git commit b871f899336f28769ec7f17673f792691454e6a3

commit  b871f899336f28769ec7f17673f792691454e6a3
Author: Robert Mustacchi <rm@fingolfin.org>
Date:   2020-01-09T07:49:44.000Z

    11876 Want a native sleep
    Reviewed by: Marcel Telka <marcel@telka.sk>
    Reviewed by: Hans Rosenfeld <rosenfeld@grumpf.hope-2000.org>
    Approved by: Garrett D'Amore <garrett@damore.org>

Actions

Also available in: Atom PDF