[Bug 264162] /bin/sleep: Add optional units (seconds, minutes, hours, days)

From: <bugzilla-noreply_at_freebsd.org>
Date: Tue, 24 May 2022 08:06:15 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=264162

--- Comment #2 from commit-hook@FreeBSD.org ---
A commit in branch main references this bug:

URL:
https://cgit.FreeBSD.org/src/commit/?id=34978f7edd15ef5aa9c14a6eecb18ae5d6fd8842

commit 34978f7edd15ef5aa9c14a6eecb18ae5d6fd8842
Author:     A. Mallory <mallorya@fastmail.com>
AuthorDate: 2022-05-24 07:43:38 +0000
Commit:     Stefan Eßer <se@FreeBSD.org>
CommitDate: 2022-05-24 07:43:38 +0000

    bin/sleep: add support for units other than seconds

    The coreutils version of this command accepts a unit designation of s,
    m, h, or d (for seconds, minutes, hours, days) immediately following
    the number of (fractional) units to delay.

    The submitted patch has been modified in one detail: the test meant to
    detect the presence of the unit modified was not specific (!= 1) and
    would have accepted a non-numeric initial element or extra characters
    following the union. The committed version accepts only the number
    immediately followed by one of the defined unit designators and no
    further characters.

    PR:             264162
    MFC after:      1 week

 bin/sleep/sleep.1 | 12 ++++++++++--
 bin/sleep/sleep.c | 18 +++++++++++++++---
 2 files changed, 25 insertions(+), 5 deletions(-)

-- 
You are receiving this mail because:
You are the assignee for the bug.